| Conditions | 6 |
| Paths | 6 |
| Total Lines | 20 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public function isOk() |
||
| 31 | { |
||
| 32 | $first = $this->getFirst(); |
||
| 33 | $last = $this->getLast(); |
||
| 34 | if (!$this->isStubOk($first)) { |
||
| 35 | return false; |
||
| 36 | } |
||
| 37 | if (0 == count($this->last)) { |
||
| 38 | return false; |
||
| 39 | } |
||
| 40 | foreach ($last as $stub) { |
||
| 41 | if (!$this->isStubOk($stub)) { |
||
| 42 | return false; |
||
| 43 | } |
||
| 44 | if (!$first->isCompatible($stub)) { |
||
| 45 | return false; |
||
| 46 | } |
||
| 47 | } |
||
| 48 | return true; |
||
| 49 | } |
||
| 50 | |||
| 73 |
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.If the return type contains the type array, this check recommends the use of a more specific type like
String[]orarray<String>.