Test Setup Failed
Branch dev (451d27)
by Someshwer
02:38
created
src/Lib/TimeZones.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
     {
103 103
         if (!$search_key || ($search_key == '/')) return [];
104 104
         $timezones = $this->prepareTimezones();
105
-        $filtered_timezones = collect($timezones)->filter(function ($item) use ($search_key) {
105
+        $filtered_timezones = collect($timezones)->filter(function($item) use ($search_key) {
106 106
             return (strpos(strtolower($item['zone']), strtolower($search_key)) !== false);
107 107
         })->values();
108 108
         return $filtered_timezones;
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,11 +84,15 @@  discard block
 block discarded – undo
84 84
      */
85 85
     public function timezonesByRegion($region = null)
86 86
     {
87
-        if (!$region) return [];
87
+        if (!$region) {
88
+            return [];
89
+        }
88 90
         $timezone_regions = $this->prepareTimezones();
89 91
         $timezone_regions_group = collect($timezone_regions)->groupBy('region');
90 92
         $regional_timezones = $timezone_regions_group->get($region);
91
-        if (!$regional_timezones) return [];
93
+        if (!$regional_timezones) {
94
+            return [];
95
+        }
92 96
         return $regional_timezones;
93 97
     }
94 98
 
@@ -100,7 +104,9 @@  discard block
 block discarded – undo
100 104
      */
101 105
     public function searchTimezone($search_key)
102 106
     {
103
-        if (!$search_key || ($search_key == '/')) return [];
107
+        if (!$search_key || ($search_key == '/')) {
108
+            return [];
109
+        }
104 110
         $timezones = $this->prepareTimezones();
105 111
         $filtered_timezones = collect($timezones)->filter(function ($item) use ($search_key) {
106 112
             return (strpos(strtolower($item['zone']), strtolower($search_key)) !== false);
Please login to merge, or discard this patch.
src/Lib/StdCodes.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -89,11 +89,11 @@  discard block
 block discarded – undo
89 89
             return [];
90 90
         }
91 91
         $std_codes = $this->getOptimizedStdCodesData();
92
-        return collect($std_codes)->filter(function ($item) use ($search_string) {
92
+        return collect($std_codes)->filter(function($item) use ($search_string) {
93 93
             return ((substr(strtolower($item['country_name']), 0, strlen($search_string)) == strtolower($search_string)) ||
94 94
                 (strtolower($item['country_code']) == strtolower($search_string)) ||
95 95
                 (strpos(strtolower($item['std_code']), strtolower($search_string)) !== false));
96
-        })->transform(function ($value) {
96
+        })->transform(function($value) {
97 97
             return array_except($value, 'id');
98 98
         })->values();
99 99
     }
@@ -110,9 +110,9 @@  discard block
 block discarded – undo
110 110
             return [];
111 111
         }
112 112
         $std_codes = $this->getOptimizedStdCodesData();
113
-        return collect($std_codes)->filter(function ($item) use ($country_name) {
113
+        return collect($std_codes)->filter(function($item) use ($country_name) {
114 114
             return (substr(strtolower($item['country_name']), 0, strlen($country_name)) == strtolower($country_name));
115
-        })->transform(function ($value) {
115
+        })->transform(function($value) {
116 116
             return array_except($value, 'id');
117 117
         })->values();
118 118
     }
@@ -129,9 +129,9 @@  discard block
 block discarded – undo
129 129
             return [];
130 130
         }
131 131
         $std_codes = $this->getOptimizedStdCodesData();
132
-        return collect($std_codes)->filter(function ($item) use ($country_code) {
132
+        return collect($std_codes)->filter(function($item) use ($country_code) {
133 133
             return (strtolower($item['country_code']) == strtolower($country_code));
134
-        })->transform(function ($value) {
134
+        })->transform(function($value) {
135 135
             return array_except($value, 'id');
136 136
         })->values();
137 137
     }
Please login to merge, or discard this patch.
src/Lib/Countries.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     {
66 66
         $all_countries_data = $this->data->countries();
67 67
         $all_countries = $this->optimizeCountryData($all_countries_data);
68
-        $countries = collect($all_countries)->map(function ($item) {
68
+        $countries = collect($all_countries)->map(function($item) {
69 69
             // return title_case(str_replace('-',' ', $item));
70 70
             return studly_case($item);
71 71
         });
@@ -83,13 +83,13 @@  discard block
 block discarded – undo
83 83
         $all_countries_data = $this->data->countries();
84 84
         $all_countries = $this->optimizeCountryData($all_countries_data);
85 85
         if ($search_string == null) {
86
-            return array_map(function ($it) {
86
+            return array_map(function($it) {
87 87
                 return studly_case($it);
88 88
             }, $all_countries);
89 89
         }
90
-        $countries = array_map(function ($it) {
90
+        $countries = array_map(function($it) {
91 91
             return studly_case($it);
92
-        }, array_filter($all_countries, function ($item) use ($search_string) {
92
+        }, array_filter($all_countries, function($item) use ($search_string) {
93 93
             return strpos($item, strtolower($search_string)) === 0;
94 94
         }));
95 95
         return ['countries' => array_values($countries)];
Please login to merge, or discard this patch.
src/Lib/Currencies.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         if (!$search_key) {
85 85
             return [];
86 86
         }
87
-        return collect($this->getOptimizedCurrenciesData())->filter(function ($item) use ($search_key) {
87
+        return collect($this->getOptimizedCurrenciesData())->filter(function($item) use ($search_key) {
88 88
             return ((strpos(strtolower($item['currency_name']), strtolower($search_key)) !== false) ||
89 89
                 (strpos(strtolower($item['country_name']), strtolower($search_key)) !== false));
90 90
         })->values();
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         if (!$country_name) {
102 102
             return [];
103 103
         }
104
-        return collect($this->getOptimizedCurrenciesData())->filter(function ($item) use ($country_name) {
104
+        return collect($this->getOptimizedCurrenciesData())->filter(function($item) use ($country_name) {
105 105
             return (strtolower($item['country_name']) == strtolower($country_name));
106 106
         })->values();
107 107
     }
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         if (!$country_code) {
118 118
             return [];
119 119
         }
120
-        return collect($this->getOptimizedCurrenciesData())->filter(function ($item) use ($country_code) {
120
+        return collect($this->getOptimizedCurrenciesData())->filter(function($item) use ($country_code) {
121 121
             return (strtolower($item['country_code']) == strtolower($country_code));
122 122
         })->values();
123 123
     }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         if (!$currency_name) {
134 134
             return [];
135 135
         }
136
-        return collect($this->getOptimizedCurrenciesData())->filter(function ($item) use ($currency_name) {
136
+        return collect($this->getOptimizedCurrenciesData())->filter(function($item) use ($currency_name) {
137 137
             return (strpos(strtolower($item['currency_name']), strtolower($currency_name)) !== false);
138 138
         })->values();
139 139
     }
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
         if (!$currency_code) {
150 150
             return [];
151 151
         }
152
-        return collect($this->getOptimizedCurrenciesData())->filter(function ($item) use ($currency_code) {
152
+        return collect($this->getOptimizedCurrenciesData())->filter(function($item) use ($currency_code) {
153 153
             return (strtolower($item['currency_code']) == strtolower($currency_code));
154 154
         })->values();
155 155
     }
Please login to merge, or discard this patch.
src/Routes/routes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
  * Time: 01:39 AM
8 8
  */
9 9
 
10
-Route::get('getMyWorldPackageInfo', function () {
10
+Route::get('getMyWorldPackageInfo', function() {
11 11
 
12 12
     return [
13 13
         'package_name' => 'Laravel - My World',
Please login to merge, or discard this patch.