| 1 | <?php |
||
| 20 | class WorkerRunnerManager |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * Worker runner services configuration. |
||
| 24 | * |
||
| 25 | * @var array |
||
| 26 | */ |
||
| 27 | private $runners = array(); |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Container. |
||
| 31 | * |
||
| 32 | * @var ContainerInterface |
||
| 33 | */ |
||
| 34 | private $container; |
||
| 35 | |||
| 36 | 6 | public function __construct(ContainerInterface $container) |
|
| 40 | |||
| 41 | /** |
||
| 42 | * Register runner service. |
||
| 43 | * |
||
| 44 | * @param string $name Worker name. |
||
| 45 | * @param string $id Service ID. |
||
| 46 | * @param array $options Worker options. |
||
| 47 | * @throws InvalidArgumentException Thrown, when there is no worker runner service registered in container. |
||
| 48 | */ |
||
| 49 | 5 | public function addRunner($name, $id, array $options = array()) |
|
| 59 | |||
| 60 | 5 | public function has($name) |
|
| 64 | |||
| 65 | 3 | public function run($name, OutputInterface $output = null) |
|
| 74 | |||
| 75 | /** |
||
| 76 | * Get registered runners. |
||
| 77 | * |
||
| 78 | * @return string[] |
||
|
1 ignored issue
–
show
|
|||
| 79 | */ |
||
| 80 | 2 | public function getRunners() |
|
| 84 | |||
| 85 | } |
||
| 86 |
This check compares the return type specified in the
@returnannotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.