Skip to content

Commit

Permalink
Bump version to PHPStan 1.7
Browse files Browse the repository at this point in the history
- PHPStan のエラー修正
  • Loading branch information
nanasess committed May 27, 2022
1 parent 68db960 commit 274cebc
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 22 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"dama/doctrine-test-bundle": "^6.6",
"fakerphp/faker": "^1.16",
"mikey179/vfsstream": "^1.6",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan": "^1.7",
"symfony/browser-kit": "^5.4",
"symfony/phpunit-bridge": "^5.4"
},
Expand Down
21 changes: 8 additions & 13 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
parameters:
level: 1
ignoreErrors:
-
message: "#^Function twig_localized_date_filter not found\\.$#"
path: src/Eccube/Twig/Extension/IntlExtension.php
2 changes: 1 addition & 1 deletion src/Eccube/Entity/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ public function getMainListImage()
{
$ProductImages = $this->getProductImage();

return empty($ProductImages) ? null : $ProductImages[0];
return $ProductImages->isEmpty() ? null : $ProductImages[0];
}

public function getMainFileName()
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Form/Type/Admin/OrderItemType.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ public function getBlockPrefix()
*/
protected function addErrorsIfExists(FormInterface $form, ConstraintViolationListInterface $errors)
{
if (empty($errors)) {
if (count($errors) < 1) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Service/EntityProxyService.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private function originalEntityPath(string $entityClassName): string
return $originalPath;
}

$rc = new ClassReflection($entityClassName);
$rc = new \ReflectionClass($entityClassName);

return str_replace('\\', '/', $rc->getFileName());
}
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Service/MailService.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ public function sendOrderMail(Order $Order)

// HTML用メールの設定
$htmlBody = $message->getHtmlBody();
if (!empty($multipart)) {
if (!empty($htmlBody)) {
$MailHistory->setMailHtmlBody($htmlBody);
}

Expand Down

0 comments on commit 274cebc

Please sign in to comment.