Skip to content
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 composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"cs-check": "phpcs -p -s --standard=vendor/spryker/code-sniffer/Spryker/ruleset.xml --ignore=/tests/app/ src/ tests/",
"cs-fix": "phpcbf -p --standard=vendor/spryker/code-sniffer/Spryker/ruleset.xml --ignore=/tests/app/ src/ tests/",
"stan": "phpstan analyse",
"stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:^1.0.0 && mv composer.backup composer.json",
"stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:^2.1.0 && mv composer.backup composer.json",
"test": "codecept build && codecept run"
},
"extra": {
Expand Down
7 changes: 4 additions & 3 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ parameters:
level: 8
paths:
- src/
checkMissingIterableValueType: false
excludePaths:
- '*/templates/*'
- 'src/Spryker/Zed/EventBehavior/Persistence/Propel/AbstractSpyEventBehaviorEntityChange.php'
- 'src/Spryker/Zed/EventBehavior/Persistence/Propel/AbstractSpyEventBehaviorEntityChangeQuery.php'
- 'src/Spryker/Zed/EventBehavior/Persistence/Propel/AbstractSpyEventBehaviorEntityChange.php (?)'
- 'src/Spryker/Zed/EventBehavior/Persistence/Propel/AbstractSpyEventBehaviorEntityChangeQuery.php (?)'
ignoreErrors:
- '#Parameter \#1 \$plugins of method .+EventResourceQueryContainerManager::processResourceEvents\(\) expects .+ given.#'
- '#Call to (static method|method) .+ on an unknown class Generated\\.+#'
- '#Cannot call method offset\(\) on .+ModelCriteria\|null#'
- '#Parameter \#1 \$clause of method .+\\ModelCriteria::where\(\) expects array\|literal-string, non-falsy-string given.#'
-
identifier: missingType.iterableValue
bootstrapFiles:
- tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Symfony\Component\HttpKernel\KernelEvents;

/**
* @method \Spryker\Glue\EventBehavior\EventBehaviorDependencyFactory getFactory()
* @method \Spryker\Zed\EventBehavior\Business\EventBehaviorFacadeInterface getFacade()
*/
class EventBehaviorEventDispatcherPlugin extends AbstractPlugin implements EventDispatcherPluginInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function key(): int
*/
public function valid(): bool
{
return is_array($this->current) && $this->current !== [];
return is_array($this->current) && $this->current !== []; // @phpstan-ignore function.alreadyNarrowedType
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function getEventTransferForeignKeys(array $eventTransfers, $foreignKeyCo
}

$value = $eventTransfer->getForeignKeys()[$foreignKeyColumnName];
if ($value !== null) {
if ($value !== null) { // @phpstan-ignore notIdentical.alwaysTrue
$foreignKeys[] = $value;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
if ($input->getOption(static::RESOURCE_IDS_OPTION)) {
/** @var string $idsString */
$idsString = $input->getOption(static::RESOURCE_IDS_OPTION);
/** @var array<int> $resourcesIds */
$resourcesIds = explode(',', $idsString);
$resourcesIds = array_map('intval', explode(',', $idsString));
}

$this->getFacade()->executeResolvedPluginsBySources($resources, $resourcesIds);
Expand Down