Issues (91)

tests/Fixture/MockTaskRunner.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace Zenstruck\ScheduleBundle\Tests\Fixture;
4
5
use Zenstruck\ScheduleBundle\Schedule\Task;
6
use Zenstruck\ScheduleBundle\Schedule\Task\Result;
7
use Zenstruck\ScheduleBundle\Schedule\Task\TaskRunner;
8
9
/**
10
 * @author Kevin Bond <[email protected]>
11
 */
12
final class MockTaskRunner implements TaskRunner
13
{
14
    /**
15
     * @param MockTask|Task $task
16
     */
17
    public function __invoke(Task $task): Result
18
    {
19
        return $task->getResult();
0 ignored issues
show
The method getResult() does not exist on Zenstruck\ScheduleBundle\Schedule\Task. It seems like you code against a sub-type of Zenstruck\ScheduleBundle\Schedule\Task such as Zenstruck\ScheduleBundle\Tests\Fixture\MockTask. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

19
        return $task->/** @scrutinizer ignore-call */ getResult();
Loading history...
20
    }
21
22
    public function supports(Task $task): bool
23
    {
24
        return $task instanceof MockTask;
25
    }
26
}
27