| Total Complexity | 3 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 7 | trait Visibled |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var bool|callable |
||
| 11 | */ |
||
| 12 | protected $visibled = true; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @return bool|callable |
||
| 16 | */ |
||
| 17 | public function getVisibled() |
||
| 18 | { |
||
| 19 | if (is_bool($this->visibled)) { |
||
| 20 | return $this->visibled; |
||
| 21 | } |
||
| 22 | |||
| 23 | return (bool) $this->getValueFromObject($this->getModel(), $this->visibled); |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param Closure|bool $visibled |
||
| 28 | * |
||
| 29 | * @return $this |
||
| 30 | */ |
||
| 31 | public function setVisibled($visibled) |
||
| 36 | } |
||
| 37 | } |
||
| 38 |