Passed
Branch 2.0.x (149bdc)
by Abdullah
02:48
created
src/Contract/TimeZoneManager.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,11 +17,11 @@
 block discarded – undo
17 17
      */
18 18
     public function getSupportedTimeZone(?string $search): array;
19 19
 
20
-     /**
21
-     * List all time zones with labels and values.
22
-     *
23
-     * @return array
24
-     */
20
+        /**
21
+         * List all time zones with labels and values.
22
+         *
23
+         * @return array
24
+         */
25 25
     public function list(?string $search): array;
26 26
 
27 27
     /**
Please login to merge, or discard this 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 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -144,9 +144,9 @@  discard block
 block discarded – undo
144 144
     }
145 145
 
146 146
     /**
147
-    * @param $time
148
-    * @return string
149
-    */
147
+     * @param $time
148
+     * @return string
149
+     */
150 150
     private function getZone(DateTime $time): string
151 151
     {
152 152
         return str_replace('_', ' ', $time->format('e'));
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
      * @param bool $isLabel
158 158
      * @param bool $isValue
159 159
      * @return array
160
-    */
160
+     */
161 161
     private function getTimeZoneList(array $timezones, string $type = 'list'): array
162 162
     {
163 163
         $label = Config::get('Timezone.LABEL_FIELD_NAME', 'label');
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
      * @param array $list
193 193
      * @param ?string $search
194 194
      * @return array
195
-    */
195
+     */
196 196
     private function search(array $list, ?string $key = '', ?string $search): array 
197 197
     {
198 198
         return collect($list)->when(!empty($search), function (Collection $collection) use($search, $key){
Please login to merge, or discard this 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.