| Conditions | 5 |
| Paths | 5 |
| Total Lines | 22 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 85 | public function getItemByLink( $link ) |
||
| 86 | { |
||
| 87 | foreach( $this->items() as $item ) |
||
| 88 | { |
||
| 89 | if( $item->getLink() === $link ) |
||
| 90 | { |
||
| 91 | return $item; |
||
| 92 | } |
||
| 93 | |||
| 94 | if( $item->hasSubMenu() ) |
||
| 95 | { |
||
| 96 | $item = $item->getSubMenu()->getItemByLink( $link ); |
||
| 97 | |||
| 98 | if( $item ) |
||
| 99 | { |
||
| 100 | return $item; |
||
| 101 | } |
||
| 102 | } |
||
| 103 | } |
||
| 104 | |||
| 105 | return null; |
||
| 106 | } |
||
| 107 | |||
| 137 |
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.