@@ -26,10 +26,10 @@ discard block |
||
26 | 26 | if (isset($categoryData['id'])) { |
27 | 27 | $this->id = (int) $categoryData['id']; |
28 | 28 | } |
29 | - if (!empty($categoryData['category'])) { |
|
29 | + if ( ! empty($categoryData['category'])) { |
|
30 | 30 | $this->name = $categoryData['category']; |
31 | 31 | } |
32 | - if (!empty($categoryData['purpose'])) { |
|
32 | + if ( ! empty($categoryData['purpose'])) { |
|
33 | 33 | $this->color = $categoryData['purpose']; |
34 | 34 | } |
35 | 35 | } |
@@ -40,13 +40,13 @@ discard block |
||
40 | 40 | public function toArray() |
41 | 41 | { |
42 | 42 | $result = []; |
43 | - if (!empty($this->id)) { |
|
43 | + if ( ! empty($this->id)) { |
|
44 | 44 | $result['id'] = $this->getId(); |
45 | 45 | } |
46 | - if (!empty($this->name)) { |
|
46 | + if ( ! empty($this->name)) { |
|
47 | 47 | $result['category'] = $this->getName(); |
48 | 48 | } |
49 | - if (!empty($this->color)) { |
|
49 | + if ( ! empty($this->color)) { |
|
50 | 50 | $result['purpose'] = $this->getColor(); |
51 | 51 | } |
52 | 52 | return $result; |
@@ -93,7 +93,7 @@ |
||
93 | 93 | if (isset($data['is_multi_line'])) { |
94 | 94 | $this->isMultiLine = (bool) $data['is_multi_line']; |
95 | 95 | } |
96 | - if (!empty($data['categories']) && is_array($data['categories'])) { |
|
96 | + if ( ! empty($data['categories']) && is_array($data['categories'])) { |
|
97 | 97 | foreach ($data['categories'] as $categoryData) { |
98 | 98 | $categoryModel = new Category($categoryData); |
99 | 99 | $this->addCategory($categoryModel); |