Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
43 | 9 | public function parseResponse($responseLine, $responseData) |
|
44 | { |
||
45 | |||
46 | 9 | $tubes = parent::parseResponse($responseLine, $responseData); |
|
47 | |||
48 | 9 | $name = $this->name; |
|
49 | $matchingTubes = $tubes->filter(function (Tube $tube) use ($name) { |
||
50 | 9 | return $tube->getName() === $name; |
|
51 | 9 | }); |
|
52 | |||
53 | 9 | return !$matchingTubes->isEmpty() ? $matchingTubes->first() : false; |
|
54 | } |
||
56 |