| Conditions | 4 |
| Paths | 5 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php namespace Anomaly\Streams\Platform\Ui\ControlPanel\Component\Navigation; |
||
| 40 | public function get($key, $default = null) |
||
| 41 | { |
||
| 42 | /* @var NavigationLinkInterface $item */ |
||
| 43 | foreach ($this->items as $item) { |
||
| 44 | if ($item->getSlug() == $key) { |
||
| 45 | return $item; |
||
| 46 | } |
||
| 47 | } |
||
| 48 | |||
| 49 | return $default ? $this->get($default) : null; |
||
| 50 | } |
||
| 51 | |||
| 62 |