Skip to content

Commit

Permalink
[Task]: PhpStan bump July (pimcore#15593)
Browse files Browse the repository at this point in the history
* bump stan in composer

* fix CommitOrderProcessor.php
see https://github.com/pimcore/ecommerce-framework-bundle/blob/349de4cd1e7fe66b8ec7f1019372edcfa48b80d1/src/CheckoutManager/V7/CommitOrderProcessor.php#L357

* fix <0, max> change in baseline

* fix wrong var

* fix set children int 0 max

* fix typo and ternary in tool requirement
see also https://github.com/pimcore/pimcore/pull/14799/files?w=1#diff-995edee38ad4f8387e58ebd52c31bcc04c56cc2448d331b1cf5e0b35c57b9efaR343-R347

* Update composer.json

* fix stan

* fix tab/space
  • Loading branch information
kingjia90 authored Jul 31, 2023
1 parent 3cc2f94 commit b0e22dc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 1 addition & 3 deletions bundles/CoreBundle/src/Command/Bundle/ListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
}

if ($input->getOption('json')) {
$jsonData = array_map(static function ($row) use ($returnData) {
return array_combine($returnData['headers'], $row);
}, $returnData['rows']);
$jsonData = array_map(fn($row) => array_combine($returnData['headers'], $row), $returnData['rows']);
$output->write(\json_encode($jsonData, \JSON_PRETTY_PRINT));
} else {
$table = new Table($output);
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@
"codeception/codeception": "^5.0.3",
"codeception/module-symfony": "^3.1.0",
"codeception/phpunit-wrapper": "^9",
"phpstan/phpstan": "1.10.5",
"phpstan/phpstan-symfony": "^1.2.20",
"phpstan/phpstan": "1.10.26",
"phpstan/phpstan-symfony": "^1.3.2",
"phpunit/phpunit": "^9.3",
"gotenberg/gotenberg-php": "^1.1",
"composer/composer": "*",
Expand Down
4 changes: 4 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ parameters:
message: "#^Call to an undefined method COM\\:\\:Run\\(\\)\\.$#"
count: 1
path: lib/Tool/Console.php
-
message: "#^Ternary operator condition is always true\\.$#"
count: 1
path: lib/Tool/Requirements.php

-
message: "#^Dead catch \\- Throwable is never thrown in the try block\\.$#"
Expand Down

0 comments on commit b0e22dc

Please sign in to comment.