Skip to content

Commit

Permalink
Fix phpstan 8.1 build
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Jun 8, 2022
1 parent 203ec4b commit 73fd0f2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Composer/Command/GlobalCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ protected function configure(): void
*/
public function run(InputInterface $input, OutputInterface $output): int
{
if (!method_exists($input, '__toString')) {
// TODO remove for Symfony 6+ as it is then in the interface
if (!method_exists($input, '__toString')) { // @phpstan-ignore-line
throw new \LogicException('Expected an Input instance that is stringable, got '.get_class($input));
}

Expand Down Expand Up @@ -119,7 +120,8 @@ public function run(InputInterface $input, OutputInterface $output): int

private function prepareSubcommandInput(InputInterface $input, bool $quiet = false): StringInput
{
if (!method_exists($input, '__toString')) {
// TODO remove for Symfony 6+ as it is then in the interface
if (!method_exists($input, '__toString')) { // @phpstan-ignore-line
throw new \LogicException('Expected an Input instance that is stringable, got '.get_class($input));
}

Expand Down

0 comments on commit 73fd0f2

Please sign in to comment.