Conditions | 4 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 0 |
1 | <?php |
||
29 | public function getMultiDeals(array $sessionParameters) |
||
30 | { |
||
31 | $responses = []; |
||
32 | static $requests = 0; |
||
33 | foreach ($sessionParameters as $sessionParameter) { |
||
34 | if (!$sessionParameter instanceof SessionParameters) { |
||
35 | throw new \LogicException(sprintf('Instance of SessionParameters need. Given %s.', $sessionParameter)); |
||
36 | } |
||
37 | |||
38 | $newSession = ($requests % 20) == 0; |
||
39 | if ($response = $this->getDeals($sessionParameter, $newSession)) { |
||
40 | $responses[] = $response; |
||
41 | $requests++; |
||
42 | } |
||
43 | } |
||
44 | |||
45 | return $responses; |
||
46 | } |
||
47 | } |
||
48 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.