| Conditions | 4 |
| Paths | 6 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function setVisibility($type, $value = null) |
||
| 15 | { |
||
| 16 | if (is_null($this->visibility)) { |
||
| 17 | $this->visibility = new Visibility(); |
||
| 18 | } |
||
| 19 | |||
| 20 | if (is_array($type)) { |
||
| 21 | $this->visibility->setType($type['type']); |
||
| 22 | $this->visibility->setValue($type['value']); |
||
| 23 | } elseif ($type instanceof Visibility) { |
||
| 24 | $this->visibility = $type; |
||
| 25 | } else { |
||
| 26 | $this->visibility->setType($type); |
||
| 27 | $this->visibility->setValue($value); |
||
| 28 | } |
||
| 29 | |||
| 30 | return $this; |
||
| 31 | } |
||
| 32 | } |