Skip to content

Commit

Permalink
phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
sowbiba committed Nov 14, 2023
1 parent f014156 commit 8165432
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/DependencyBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,17 +247,15 @@ protected function isMboNeeded()
/**
* @param bool $addRoutes
*
* @return array{
* array{}|array{ps_mbo: array<string, bool|string|int>}
* }
* @return array{}|array{ps_mbo: array<string, bool|string|int>}
*
* @throws \Exception
*/
private function getDependencies($addRoutes = false)

Check failure on line 254 in src/DependencyBuilder.php

View workflow job for this annotation

GitHub Actions / PHPStan (https://github.com/PrestaShop/PrestaShop/releases/download/8.0.0/prestashop_8.0.0.zip)

Method Prestashop\ModuleLibMboInstaller\DependencyBuilder::getDependencies() never returns array{} so it can be removed from the return type.

Check failure on line 254 in src/DependencyBuilder.php

View workflow job for this annotation

GitHub Actions / PHPStan (https://github.com/PrestaShop/PrestaShop/releases/download/1.7.4.4/prestashop_1.7.4.4.zip)

Method Prestashop\ModuleLibMboInstaller\DependencyBuilder::getDependencies() never returns array{} so it can be removed from the return type.

Check failure on line 254 in src/DependencyBuilder.php

View workflow job for this annotation

GitHub Actions / PHPStan (https://github.com/PrestaShop/PrestaShop/releases/download/8.0.0/prestashop_8.0.0.zip)

Method Prestashop\ModuleLibMboInstaller\DependencyBuilder::getDependencies() never returns array{} so it can be removed from the return type.

Check failure on line 254 in src/DependencyBuilder.php

View workflow job for this annotation

GitHub Actions / PHPStan (https://github.com/PrestaShop/PrestaShop/releases/download/1.7.4.4/prestashop_1.7.4.4.zip)

Method Prestashop\ModuleLibMboInstaller\DependencyBuilder::getDependencies() never returns array{} so it can be removed from the return type.
{
$dependenciesContent = $this->getDependenciesSpecification();

if (empty($dependenciesContent['dependencies']) || !is_array($dependenciesContent['dependencies'])) {
if (!is_array($dependenciesContent) || empty($dependenciesContent['dependencies'])) {

Check failure on line 258 in src/DependencyBuilder.php

View workflow job for this annotation

GitHub Actions / PHPStan (https://github.com/PrestaShop/PrestaShop/releases/download/8.0.0/prestashop_8.0.0.zip)

Offset 'dependencies' on array{dependencies: array{}} in empty() always exists and is always falsy.

Check failure on line 258 in src/DependencyBuilder.php

View workflow job for this annotation

GitHub Actions / PHPStan (https://github.com/PrestaShop/PrestaShop/releases/download/8.0.0/prestashop_8.0.0.zip)

Result of || is always true.

Check failure on line 258 in src/DependencyBuilder.php

View workflow job for this annotation

GitHub Actions / PHPStan (https://github.com/PrestaShop/PrestaShop/releases/download/1.7.4.4/prestashop_1.7.4.4.zip)

Offset 'dependencies' on array{dependencies: array{}} in empty() always exists and is always falsy.

Check failure on line 258 in src/DependencyBuilder.php

View workflow job for this annotation

GitHub Actions / PHPStan (https://github.com/PrestaShop/PrestaShop/releases/download/1.7.4.4/prestashop_1.7.4.4.zip)

Result of || is always true.

Check failure on line 258 in src/DependencyBuilder.php

View workflow job for this annotation

GitHub Actions / PHPStan (https://github.com/PrestaShop/PrestaShop/releases/download/8.0.0/prestashop_8.0.0.zip)

Offset 'dependencies' on array{dependencies: array{}} in empty() always exists and is always falsy.

Check failure on line 258 in src/DependencyBuilder.php

View workflow job for this annotation

GitHub Actions / PHPStan (https://github.com/PrestaShop/PrestaShop/releases/download/8.0.0/prestashop_8.0.0.zip)

Result of || is always true.

Check failure on line 258 in src/DependencyBuilder.php

View workflow job for this annotation

GitHub Actions / PHPStan (https://github.com/PrestaShop/PrestaShop/releases/download/1.7.4.4/prestashop_1.7.4.4.zip)

Offset 'dependencies' on array{dependencies: array{}} in empty() always exists and is always falsy.

Check failure on line 258 in src/DependencyBuilder.php

View workflow job for this annotation

GitHub Actions / PHPStan (https://github.com/PrestaShop/PrestaShop/releases/download/1.7.4.4/prestashop_1.7.4.4.zip)

Result of || is always true.
return [

Check failure on line 259 in src/DependencyBuilder.php

View workflow job for this annotation

GitHub Actions / PHPStan (https://github.com/PrestaShop/PrestaShop/releases/download/8.0.0/prestashop_8.0.0.zip)

Method Prestashop\ModuleLibMboInstaller\DependencyBuilder::getDependencies() should return array{}|array{ps_mbo: array<string, bool|int|string>} but returns array{ps_mbo: array<string, bool|int|string>|null}.

Check failure on line 259 in src/DependencyBuilder.php

View workflow job for this annotation

GitHub Actions / PHPStan (https://github.com/PrestaShop/PrestaShop/releases/download/1.7.4.4/prestashop_1.7.4.4.zip)

Method Prestashop\ModuleLibMboInstaller\DependencyBuilder::getDependencies() should return array{}|array{ps_mbo: array<string, bool|int|string>} but returns array{ps_mbo: array<string, bool|int|string>|null}.

Check failure on line 259 in src/DependencyBuilder.php

View workflow job for this annotation

GitHub Actions / PHPStan (https://github.com/PrestaShop/PrestaShop/releases/download/8.0.0/prestashop_8.0.0.zip)

Method Prestashop\ModuleLibMboInstaller\DependencyBuilder::getDependencies() should return array{}|array{ps_mbo: array<string, bool|int|string>} but returns array{ps_mbo: array<string, bool|int|string>|null}.

Check failure on line 259 in src/DependencyBuilder.php

View workflow job for this annotation

GitHub Actions / PHPStan (https://github.com/PrestaShop/PrestaShop/releases/download/1.7.4.4/prestashop_1.7.4.4.zip)

Method Prestashop\ModuleLibMboInstaller\DependencyBuilder::getDependencies() should return array{}|array{ps_mbo: array<string, bool|int|string>} but returns array{ps_mbo: array<string, bool|int|string>|null}.
Installer::MODULE_NAME => $this->addMboInDependencies(),
];
Expand Down

0 comments on commit 8165432

Please sign in to comment.