@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | public static function search(array $array, $searchText, $sensitive = false) |
148 | 148 | { |
149 | 149 | $function = ($sensitive) ? 'strpos' : 'stripos'; |
150 | - return array_filter($array, function ($item) use ($searchText, $function) { |
|
150 | + return array_filter($array, function($item) use ($searchText, $function) { |
|
151 | 151 | $response = false; |
152 | 152 | foreach ($item as $key => $value) { |
153 | 153 | if ($response) { |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | $array = array_values($array); // align array keys |
191 | 191 | $columns = array_column($array, $column); |
192 | 192 | $key = array_search($search, $columns); |
193 | - return ($key !== false) ? $array[$key] : false; |
|
193 | + return ($key !== false) ? $array[$key] : false; |
|
194 | 194 | } |
195 | 195 | |
196 | 196 | /** |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | */ |
223 | 223 | public static function searchColumns(array $array, $column, $search) |
224 | 224 | { |
225 | - $keys = array_filter($array, function ($var) use ($column, $search) { |
|
225 | + $keys = array_filter($array, function($var) use ($column, $search) { |
|
226 | 226 | return strcasecmp($search, $var[$column]) == 0 ? true : false; |
227 | 227 | }); |
228 | 228 | |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | $array = array_combine($range, $range); |
263 | 263 | |
264 | 264 | if ($text) { |
265 | - array_walk($array, function (&$item, $key) use ($text) { |
|
265 | + array_walk($array, function(&$item, $key) use ($text) { |
|
266 | 266 | if (is_array($text)) { |
267 | 267 | list($singular, $plural) = $text; |
268 | 268 | if ($key == 1) { |
@@ -230,7 +230,7 @@ |
||
230 | 230 | $results = ArrayHelper::searchColumns($results, $key, $value); |
231 | 231 | } |
232 | 232 | |
233 | - return empty($results) ? false : key($results);; |
|
233 | + return empty($results) ? false : key($results); ; |
|
234 | 234 | } |
235 | 235 | |
236 | 236 | private $_keys; |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | } |
48 | 48 | |
49 | 49 | if ($throwException) { |
50 | - throw new Exception("The given object must be an instance of: " . implode(",", $haystack)); |
|
50 | + throw new Exception("The given object must be an instance of: ".implode(",", $haystack)); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | return false; |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | } |
213 | 213 | } catch (InvalidParamException $e) { |
214 | 214 | try { |
215 | - $staticPath = $module::staticBasePath() . DIRECTORY_SEPARATOR . 'controllers'; |
|
215 | + $staticPath = $module::staticBasePath().DIRECTORY_SEPARATOR.'controllers'; |
|
216 | 216 | foreach (FileHelper::findFiles($staticPath) as $file) { |
217 | 217 | $files[self::fileToName($staticPath, $file)] = $file; |
218 | 218 | } |