Skip to content

Commit

Permalink
Fix phpstan issues
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz committed Jan 28, 2024
1 parent 088975e commit c5a2778
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Composer/Command/OutdatedCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int

$input = new ArrayInput($args);


$composer = $this->tryComposer();

if ($composer) {
if ($composer !== null) {
$commandEvent = new CommandEvent(PluginEvents::COMMAND, 'archive', $input, $output);
$eventDispatcher = $composer->getEventDispatcher();
$eventDispatcher->dispatch($commandEvent->getName(), $commandEvent);
Expand All @@ -125,7 +124,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int

$returnCode = $this->getApplication()->run($input, $output);

if (0 === $returnCode && $composer) {
if (0 === $returnCode && $composer !== null) {
$composer->getEventDispatcher()->dispatchScript(ScriptEvents::POST_OUTDATED_CMD);
}

Expand Down

0 comments on commit c5a2778

Please sign in to comment.