Skip to content

Revamp the CommandTester #379

Revamp the CommandTester

Revamp the CommandTester #379

Triggered via pull request December 7, 2024 10:37
Status Failure
Total duration 38s
Artifacts

auto-review.yaml

on: pull_request
AutoReview
28s
AutoReview
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 1 warning
InvalidReturnType: src/Output/Formatter/DefaultFormatterFactory.php#L28
src/Output/Formatter/DefaultFormatterFactory.php:28:31: InvalidReturnType: The declared return type 'Symfony\Component\Console\Formatter\OutputFormatterInterface' for Fidry\Console\Output\Formatter\DefaultFormatterFactory::create is incorrect, got 'Fidry\Console\Output\Formatter\OutputFormatterFactory' (see https://psalm.dev/011)
InvalidReturnStatement: src/Output/Formatter/DefaultFormatterFactory.php#L30
src/Output/Formatter/DefaultFormatterFactory.php:30:16: InvalidReturnStatement: The inferred type 'Fidry\Console\Output\Formatter\OutputFormatterFactory' does not match the declared return type 'Symfony\Component\Console\Formatter\OutputFormatterInterface' for Fidry\Console\Output\Formatter\DefaultFormatterFactory::create (see https://psalm.dev/128)
UnusedMethod: src/Test/CombinedOutput.php#L40
src/Test/CombinedOutput.php:40:22: UnusedMethod: Cannot find any calls to private method Fidry\Console\Test\CombinedOutput::doWrite (see https://psalm.dev/076)
UnusedParam: src/Test/CombinedOutput.php#L40
src/Test/CombinedOutput.php:40:37: UnusedParam: Param message is never referenced in this method (see https://psalm.dev/135)
UnusedParam: src/Test/CombinedOutput.php#L40
src/Test/CombinedOutput.php:40:52: UnusedParam: Param newline is never referenced in this method (see https://psalm.dev/135)
MoreSpecificReturnType: src/Test/CommandTester.php#L43
src/Test/CommandTester.php:43:66: MoreSpecificReturnType: The declared return type 'Fidry\Console\Test\CommandTester&static' for Fidry\Console\Test\CommandTester::fromConsoleCommand is more specific than the inferred return type 'Fidry\Console\Test\CommandTester' (see https://psalm.dev/070)
LessSpecificReturnStatement: src/Test/CommandTester.php#L54
src/Test/CommandTester.php:54:16: LessSpecificReturnStatement: The type 'Fidry\Console\Test\CommandTester' is more general than the declared return type 'Fidry\Console\Test\CommandTester&static' for Fidry\Console\Test\CommandTester::fromConsoleCommand (see https://psalm.dev/129)
InvalidArgument: src/Test/CommandTester.php#L70
src/Test/CommandTester.php:70:13: InvalidArgument: Argument 1 of Fidry\Console\Output\Formatter\DefaultFormatterFactory::__construct expects Closure():Fidry\Console\Output\Formatter\OutputFormatterFactory, but impure-Closure():Symfony\Component\Console\Formatter\OutputFormatter provided (see https://psalm.dev/004)
PossiblyUnusedReturnValue: src/Test/CommandTester.php#L124
src/Test/CommandTester.php:124:44: PossiblyUnusedReturnValue: The return value for this method is never used (see https://psalm.dev/273)
ArgumentTypeCoercion: src/Test/CommandTester.php#L131
src/Test/CommandTester.php:131:13: ArgumentTypeCoercion: Argument 1 of Fidry\Console\Test\TestOutput::__construct expects 8|16|32|64|128|256, but parent type int|null provided (see https://psalm.dev/193)
AutoReview
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636