@@ -9,13 +9,18 @@ |
||
| 9 | 9 | private $description; |
| 10 | 10 | |
| 11 | 11 | public function __construct($description = null) { |
| 12 | - if (!is_null($description)) |
|
| 13 | - $this->description = $description; |
|
| 12 | + if (!is_null($description)) { |
|
| 13 | + $this->description = $description; |
|
| 14 | + } |
|
| 14 | 15 | } |
| 15 | 16 | |
| 16 | 17 | public function validate($value): bool { |
| 17 | - if (is_array($value)) return true; |
|
| 18 | - if (is_object($value) && $value instanceof \Traversable) return true; |
|
| 18 | + if (is_array($value)) { |
|
| 19 | + return true; |
|
| 20 | + } |
|
| 21 | + if (is_object($value) && $value instanceof \Traversable) { |
|
| 22 | + return true; |
|
| 23 | + } |
|
| 19 | 24 | return false; |
| 20 | 25 | } |
| 21 | 26 | |