Total Complexity | 6 |
Total Lines | 59 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | class CreateCommand extends AbstractCommand implements \Pheanstalk\ResponseParser |
||
21 | { |
||
22 | /** @var Workflow $workflow */ |
||
23 | private $workflow; |
||
24 | |||
25 | /** |
||
26 | * Puts a job on the queue. |
||
27 | * |
||
28 | * @param Workflow $workflow The workflow to create |
||
29 | */ |
||
30 | 1 | public function __construct(Workflow $workflow) |
|
31 | { |
||
32 | 1 | $this->workflow = $workflow; |
|
33 | } |
||
34 | |||
35 | /** |
||
36 | * @inheritDoc |
||
37 | */ |
||
38 | 1 | public function getGroup(): string |
|
39 | { |
||
40 | 1 | return 'workflow'; |
|
41 | } |
||
42 | |||
43 | /** |
||
44 | * @inheritDoc |
||
45 | */ |
||
46 | 1 | public function getAction(): string |
|
49 | } |
||
50 | |||
51 | /** |
||
52 | * @inheritDoc |
||
53 | */ |
||
54 | 1 | public function getFilters(): array |
|
61 | ]; |
||
62 | } |
||
63 | |||
64 | /** |
||
65 | * @inheritDoc |
||
66 | */ |
||
67 | 1 | public function getResponseParser() |
|
68 | { |
||
69 | 1 | return $this; |
|
70 | } |
||
71 | |||
72 | /** |
||
73 | * @inheritDoc |
||
74 | */ |
||
75 | 1 | public function parseResponse($responseLine, $responseData) |
|
79 | } |
||
80 | } |
||
81 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: