diff --git a/src/Eccube/Controller/Admin/Content/FileController.php b/src/Eccube/Controller/Admin/Content/FileController.php index 228a825546c..cb5713a2bf1 100644 --- a/src/Eccube/Controller/Admin/Content/FileController.php +++ b/src/Eccube/Controller/Admin/Content/FileController.php @@ -37,7 +37,7 @@ class FileController extends AbstractController public const SJIS = 'sjis-win'; public const UTF = 'UTF-8'; private $errors = []; - private $encode = ''; + private $encode; /** * FileController constructor. diff --git a/src/Eccube/Doctrine/Query/JoinClause.php b/src/Eccube/Doctrine/Query/JoinClause.php index f8eb1adf0a2..9e3fb29f214 100644 --- a/src/Eccube/Doctrine/Query/JoinClause.php +++ b/src/Eccube/Doctrine/Query/JoinClause.php @@ -30,7 +30,7 @@ class JoinClause private $indexBy; - private $leftJoin = false; + private $leftJoin; /** * @var JoinClauseWhereCustomizer @@ -52,7 +52,7 @@ class JoinClause * @param $condition * @param $indexBy */ - private function __construct($leftJoin, $join, $alias, $conditionType = null, $condition = null, $indexBy = null) + private function __construct(bool $leftJoin, $join, $alias, $conditionType = null, $condition = null, $indexBy = null) { $this->leftJoin = $leftJoin; $this->join = $join; @@ -77,7 +77,7 @@ private function __construct($leftJoin, $join, $alias, $conditionType = null, $c * * @return JoinClause */ - public static function innerJoin($join, $alias, $conditionType = null, $condition = null, $indexBy = null) + public static function innerJoin($join, $alias, $conditionType = null, $condition = null, $indexBy = null): JoinClause { return new JoinClause(false, $join, $alias, $conditionType, $condition, $indexBy); } @@ -95,7 +95,7 @@ public static function innerJoin($join, $alias, $conditionType = null, $conditio * * @return JoinClause */ - public static function leftJoin($join, $alias, $conditionType = null, $condition = null, $indexBy = null) + public static function leftJoin($join, $alias, $conditionType = null, $condition = null, $indexBy = null): JoinClause { return new JoinClause(true, $join, $alias, $conditionType, $condition, $indexBy); } @@ -107,7 +107,7 @@ public static function leftJoin($join, $alias, $conditionType = null, $condition * * @return $this */ - public function addWhere(WhereClause $whereClause) + public function addWhere(WhereClause $whereClause): self { $this->whereCustomizer->add($whereClause); @@ -121,7 +121,7 @@ public function addWhere(WhereClause $whereClause) * * @return $this */ - public function addOrderBy(OrderByClause $orderByClause) + public function addOrderBy(OrderByClause $orderByClause): self { $this->orderByCustomizer->add($orderByClause); @@ -147,7 +147,7 @@ class JoinClauseWhereCustomizer extends WhereCustomizer */ private $whereClauses = []; - public function add(WhereClause $whereClause) + public function add(WhereClause $whereClause): void { $this->whereClauses[] = $whereClause; } @@ -158,7 +158,7 @@ public function add(WhereClause $whereClause) * * @return WhereClause[] */ - protected function createStatements($params, $queryKey) + protected function createStatements($params, $queryKey): array { return $this->whereClauses; } @@ -168,7 +168,7 @@ protected function createStatements($params, $queryKey) * * @return string */ - public function getQueryKey() + public function getQueryKey(): string { return ''; } @@ -192,7 +192,7 @@ public function add(OrderByClause $orderByClause) * * @return OrderByClause[] */ - protected function createStatements($params, $queryKey) + protected function createStatements($params, $queryKey): array { return $this->orderByClauses; } @@ -202,7 +202,7 @@ protected function createStatements($params, $queryKey) * * @return string */ - public function getQueryKey() + public function getQueryKey(): string { return ''; } diff --git a/src/Eccube/Service/PurchaseFlow/InvalidItemException.php b/src/Eccube/Service/PurchaseFlow/InvalidItemException.php index f6f011670b6..48f2b677e7e 100644 --- a/src/Eccube/Service/PurchaseFlow/InvalidItemException.php +++ b/src/Eccube/Service/PurchaseFlow/InvalidItemException.php @@ -17,7 +17,7 @@ class InvalidItemException extends \Exception { - private $messageArgs = []; + private $messageArgs; private $warning; @@ -31,7 +31,7 @@ public function __construct($message = null, $messageArgs = [], $warning = false /** * @return array */ - public function getMessageArgs() + public function getMessageArgs(): array { return $this->messageArgs; } @@ -39,7 +39,7 @@ public function getMessageArgs() /** * @return bool */ - public function isWarning() + public function isWarning(): bool { return $this->warning; } @@ -47,7 +47,7 @@ public function isWarning() /** * @return InvalidItemException */ - public static function fromProductClass($errorMessage, ProductClass $ProductClass) + public static function fromProductClass($errorMessage, ProductClass $ProductClass): self { $productName = $ProductClass->getProduct()->getName(); if ($ProductClass->hasClassCategory1()) {