Completed
Pull Request — master (#1919)
by Sohel Ahmed
03:34
created
core/helpers/ArrayHelper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
core/helpers/ObjectHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         }
46 46
         
47 47
         if ($throwException) {
48
-            throw new Exception("The given object must be an instance of: " . implode(",", $haystack));
48
+            throw new Exception("The given object must be an instance of: ".implode(",", $haystack));
49 49
         }
50 50
         
51 51
         return false;
Please login to merge, or discard this patch.