Passed
Push — master ( 10b845...c93f04 )
by du
01:52
created
src/Imp/RequestHandlerImp.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,5 +14,5 @@
 block discarded – undo
14 14
 
15 15
     public function getTryTimes(): int;
16 16
 
17
-    public function getErrors(): array ;
17
+    public function getErrors(): array;
18 18
 }
Please login to merge, or discard this patch.
src/Support/helpers.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (! function_exists('toUnderScore')) {
3
+if (!function_exists('toUnderScore')) {
4 4
     function toUnderScore($str)
5 5
     {
6
-        $result = preg_replace_callback('/([A-Z]+)/', function ($matches) {
6
+        $result = preg_replace_callback('/([A-Z]+)/', function($matches) {
7 7
             return '_' . strtolower($matches[0]);
8 8
         }, $str);
9 9
 
Please login to merge, or discard this patch.
src/ServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 
9 9
     public function register()
10 10
     {
11
-        $this->app->singleton(IpClient::class, function () {
11
+        $this->app->singleton(IpClient::class, function() {
12 12
             return new IpClient;
13 13
         });
14 14
 
Please login to merge, or discard this patch.
src/IpClient.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     {
84 84
         $b = preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/", $ip);
85 85
 
86
-        if (! $b) {
86
+        if (!$b) {
87 87
             throw new InvalidIpAddress;
88 88
         }
89 89
     }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     public function resolveProviders()
97 97
     {
98 98
         foreach ($this->getProviders() as $provider) {
99
-            if (! isset($this->instances[$provider])) {
99
+            if (!isset($this->instances[$provider])) {
100 100
                 $this->instances[$provider] = $this->createProvider($provider);
101 101
             }
102 102
         }
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 
122 122
         $class = __NAMESPACE__ . "\Strategies\\{$shortName}";
123 123
 
124
-        if (! class_exists($class)) {
124
+        if (!class_exists($class)) {
125 125
             throw new IpProviderClassNotExistException("{$class} 不存在");
126 126
         }
127 127
 
@@ -152,11 +152,11 @@  discard block
 block discarded – undo
152 152
     {
153 153
         $response = $this->getOriginalInfo();
154 154
 
155
-        if (! $response['success']) {
155
+        if (!$response['success']) {
156 156
             return (new NullDataMapper())->setInfo(['ip' => $this->getIp()]);
157 157
         }
158 158
 
159
-        if (! $this->dataMapper) {
159
+        if (!$this->dataMapper) {
160 160
             $this->dataMapper = new DataMapper();
161 161
 
162 162
             return $this->dataMapper->setInfo($response);
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
      */
173 173
     public function getRequestHandler()
174 174
     {
175
-        if (! $this->requestHandler) {
175
+        if (!$this->requestHandler) {
176 176
             return $this->requestHandler = new RequestHandler();
177 177
         }
178 178
 
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
      */
274 274
     public function getProviderConfig(string $provider): array
275 275
     {
276
-        if (! isset($this->providerConfig[$provider])) {
276
+        if (!isset($this->providerConfig[$provider])) {
277 277
             return [];
278 278
         }
279 279
 
Please login to merge, or discard this patch.
src/DataMapper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
      */
90 90
     public function hasInfo(): bool
91 91
     {
92
-        return ! is_null($this->info);
92
+        return !is_null($this->info);
93 93
     }
94 94
 
95 95
     /**
Please login to merge, or discard this patch.