Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

プロパティの冗長な初期値を削除 #5690

Merged
merged 3 commits into from
Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Eccube/Controller/Admin/Content/FileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
22 changes: 11 additions & 11 deletions src/Eccube/Doctrine/Query/JoinClause.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class JoinClause

private $indexBy;

private $leftJoin = false;
private $leftJoin;

/**
* @var JoinClauseWhereCustomizer
Expand All @@ -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;
Expand All @@ -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);
}
Expand All @@ -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);
}
Expand All @@ -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);

Expand All @@ -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);

Expand All @@ -147,7 +147,7 @@ class JoinClauseWhereCustomizer extends WhereCustomizer
*/
private $whereClauses = [];

public function add(WhereClause $whereClause)
public function add(WhereClause $whereClause): void
{
$this->whereClauses[] = $whereClause;
}
Expand All @@ -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;
}
Expand All @@ -168,7 +168,7 @@ protected function createStatements($params, $queryKey)
*
* @return string
*/
public function getQueryKey()
public function getQueryKey(): string
{
return '';
}
Expand All @@ -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;
}
Expand All @@ -202,7 +202,7 @@ protected function createStatements($params, $queryKey)
*
* @return string
*/
public function getQueryKey()
public function getQueryKey(): string
{
return '';
}
Expand Down
8 changes: 4 additions & 4 deletions src/Eccube/Service/PurchaseFlow/InvalidItemException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

class InvalidItemException extends \Exception
{
private $messageArgs = [];
private $messageArgs;

private $warning;

Expand All @@ -31,23 +31,23 @@ public function __construct($message = null, $messageArgs = [], $warning = false
/**
* @return array
*/
public function getMessageArgs()
public function getMessageArgs(): array
{
return $this->messageArgs;
}

/**
* @return bool
*/
public function isWarning()
public function isWarning(): bool
{
return $this->warning;
}

/**
* @return InvalidItemException
*/
public static function fromProductClass($errorMessage, ProductClass $ProductClass)
public static function fromProductClass($errorMessage, ProductClass $ProductClass): self
{
$productName = $ProductClass->getProduct()->getName();
if ($ProductClass->hasClassCategory1()) {
Expand Down