Passed
Branch 2.0.x (149bdc)
by Abdullah
02:48
created
src/Contract/TimeZoneManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
      *
23 23
      * @return array
24 24
      */
25
-    public function list(?string $search): array;
25
+    public function list(?string $search) : array;
26 26
 
27 27
     /**
28 28
      * List time zones by region.
Please login to merge, or discard this patch.
src/Service/TimeZoneService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     /**
50 50
      * @return array
51 51
      */
52
-    public function list(?string $search = ''): array
52
+    public function list(?string $search = '') : array
53 53
     {
54 54
         $list = [];
55 55
         foreach ($this->regions as $region) {
@@ -195,8 +195,8 @@  discard block
 block discarded – undo
195 195
     */
196 196
     private function search(array $list, ?string $key = '', ?string $search): array 
197 197
     {
198
-        return collect($list)->when(!empty($search), function (Collection $collection) use($search, $key){
199
-            return $collection->filter(fn($item) => Str::contains(Str::lower(!empty($key) ? $item[$key] :$item), Str::lower($search)));
198
+        return collect($list)->when(!empty($search), function(Collection $collection) use($search, $key){
199
+            return $collection->filter(fn($item) => Str::contains(Str::lower(!empty($key) ? $item[$key] : $item), Str::lower($search)));
200 200
         })->values()->toArray();
201 201
     }
202 202
 }
203 203
\ No newline at end of file
Please login to merge, or discard this patch.