Skip to content

Commit

Permalink
Fix CS
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jun 6, 2024
1 parent 487e1ad commit 792118f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/GeneratedConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ final class GeneratedConfig

public const NOT_INSTALLED = [];

/** @var string|null */
public const PHPSTAN_VERSION_CONSTRAINT = null;

private function __construct()
Expand Down
7 changes: 5 additions & 2 deletions src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use function array_key_exists;
use function array_keys;
use function class_exists;
use function count;
use function dirname;
use function file_exists;
use function file_put_contents;
Expand Down Expand Up @@ -162,9 +163,11 @@ public function process(Event $event): void
$installedPackages[$package->getName()] = true;

$packageRequires = $package->getRequires();
if (array_key_exists('phpstan/phpstan', $packageRequires)) {
$phpstanVersionConstraints[] = $packageRequires['phpstan/phpstan']->getConstraint();
if (!array_key_exists('phpstan/phpstan', $packageRequires)) {
continue;
}

$phpstanVersionConstraints[] = $packageRequires['phpstan/phpstan']->getConstraint();
}

$phpstanVersionConstraint = null;
Expand Down

0 comments on commit 792118f

Please sign in to comment.