| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 79 | public function isVisible(): bool |
||
| 80 | { |
||
| 81 | if (!empty($this->item['permission'])) { |
||
| 82 | return $this->vault->getGuard()->allows($this->item['permission']); |
||
| 83 | } |
||
| 84 | |||
| 85 | //Remove :action |
||
| 86 | $target = current(explode(':', $this->getTarget())); |
||
| 87 | |||
| 88 | return $this->vault->getGuard()->allows( |
||
| 89 | "{$this->vault->getConfig()->guardNamespace()}.{$target}" |
||
| 90 | ); |
||
| 91 | } |
||
| 92 | } |