@@ -20,7 +20,7 @@ |
||
20 | 20 | * @return StringHelper |
21 | 21 | */ |
22 | 22 | protected function getStringHelper() { |
23 | - if(empty($this->StringHelper)) { |
|
23 | + if (empty($this->StringHelper)) { |
|
24 | 24 | $this->StringHelper = new StringHelper(); |
25 | 25 | } |
26 | 26 | return $this->StringHelper; |
@@ -20,7 +20,7 @@ |
||
20 | 20 | * @return DateTimeHelper |
21 | 21 | */ |
22 | 22 | protected function getDateTimeHelper() { |
23 | - if(empty($this->DateTimeHelper)) { |
|
23 | + if (empty($this->DateTimeHelper)) { |
|
24 | 24 | $this->DateTimeHelper = new DateTimeHelper(); |
25 | 25 | } |
26 | 26 | return $this->DateTimeHelper; |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | } |
40 | 40 | $dates = []; |
41 | 41 | $current = $startTimestamp; |
42 | - while($current <= $endTimestamp) { |
|
42 | + while ($current <= $endTimestamp) { |
|
43 | 43 | $dates[] = ($format) ? date($format, $current) : $current; |
44 | 44 | $current += $step; |
45 | 45 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | throw new \Exception('Dates interval is not valid'); |
63 | 63 | } |
64 | 64 | $current = $startTimestamp; |
65 | - while($current <= $endTimestamp) { |
|
65 | + while ($current <= $endTimestamp) { |
|
66 | 66 | $function($current); |
67 | 67 | $current += $step; |
68 | 68 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | * @return JsonHelper |
21 | 21 | */ |
22 | 22 | protected function getJsonHelper() { |
23 | - if(empty($this->JsonHelper)) { |
|
23 | + if (empty($this->JsonHelper)) { |
|
24 | 24 | $this->JsonHelper = new JsonHelper(); |
25 | 25 | } |
26 | 26 | return $this->JsonHelper; |
@@ -33,9 +33,9 @@ discard block |
||
33 | 33 | return array_column($array, $valueParam, $keyParam); |
34 | 34 | } |
35 | 35 | $data = array(); |
36 | - if(!empty($array)) { |
|
37 | - foreach($array as $key => $value) { |
|
38 | - if(empty($keyParam)) { |
|
36 | + if (!empty($array)) { |
|
37 | + foreach ($array as $key => $value) { |
|
38 | + if (empty($keyParam)) { |
|
39 | 39 | $data[$key] = $value[$valueParam]; |
40 | 40 | } else { |
41 | 41 | $data[$value[$keyParam]] = $value[$valueParam]; |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | */ |
106 | 106 | public function extract(array $array, array $keys) { |
107 | 107 | $found = []; |
108 | - if($array && $keys) { |
|
108 | + if ($array && $keys) { |
|
109 | 109 | foreach ($keys as $key) { |
110 | 110 | if ($this->keyExist($array, $key)) { |
111 | 111 | $found[$key] = $array[$key]; |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | * @return array |
124 | 124 | */ |
125 | 125 | public function exclude(array $array, array $keys) { |
126 | - if($array && $keys) { |
|
126 | + if ($array && $keys) { |
|
127 | 127 | foreach ($keys as $key) { |
128 | 128 | $this->delete($array, $key); |
129 | 129 | } |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | $keyPosition++; |
183 | 183 | } |
184 | 184 | |
185 | - if (false !== $keyPosition ) { |
|
185 | + if (false !== $keyPosition) { |
|
186 | 186 | $result = array_slice($array, 0, $keyPosition); |
187 | 187 | $result = array_merge($result, $insert); |
188 | 188 | $result = array_merge($result, array_slice($array, $keyPosition)); |
@@ -20,7 +20,7 @@ |
||
20 | 20 | * @return ArrayHelper |
21 | 21 | */ |
22 | 22 | protected function getArrayHelper() { |
23 | - if(empty($this->ArrayHelper)) { |
|
23 | + if (empty($this->ArrayHelper)) { |
|
24 | 24 | $this->ArrayHelper = new ArrayHelper(); |
25 | 25 | } |
26 | 26 | return $this->ArrayHelper; |