Passed
Push — master ( c22817...914e5a )
by du
04:55
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/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.
src/IpClient.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     {
83 83
         $b = preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/", $ip);
84 84
 
85
-        if (! $b) {
85
+        if (!$b) {
86 86
             throw new InvalidIpAddress;
87 87
         }
88 88
     }
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     public function resolveProviders()
96 96
     {
97 97
         foreach ($this->getProviders() as $provider) {
98
-            if (! isset($this->instances[$provider])) {
98
+            if (!isset($this->instances[$provider])) {
99 99
                 $this->instances[$provider] = $this->createProvider($provider);
100 100
             }
101 101
         }
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
         $class = __NAMESPACE__ . "\Strategies\\{$shortName}";
122 122
 
123
-        if (! class_exists($class)) {
123
+        if (!class_exists($class)) {
124 124
             throw new IpProviderClassNotExistException("{$class} 不存在");
125 125
         }
126 126
 
@@ -151,11 +151,11 @@  discard block
 block discarded – undo
151 151
     {
152 152
         $response = $this->getOriginalInfo();
153 153
 
154
-        if (! $response['success']) {
154
+        if (!$response['success']) {
155 155
             return (new NullDataMapper())->setInfo(['ip' => $this->getIp()]);
156 156
         }
157 157
 
158
-        if (! $this->dataMapper) {
158
+        if (!$this->dataMapper) {
159 159
             $this->dataMapper = new DataMapper();
160 160
 
161 161
             return $this->dataMapper->setInfo($response);
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
      */
172 172
     public function getRequestHandler()
173 173
     {
174
-        if (! $this->requestHandler) {
174
+        if (!$this->requestHandler) {
175 175
             return $this->requestHandler = new RequestHandler();
176 176
         }
177 177
 
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
      */
250 250
     public function getIp()
251 251
     {
252
-        if (! $this->ip) {
252
+        if (!$this->ip) {
253 253
             throw new \Exception('请先设置 ip');
254 254
         }
255 255
 
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
      */
277 277
     public function getProviderConfig(string $provider): array
278 278
     {
279
-        if (! isset($this->providerConfig[$provider])) {
279
+        if (!isset($this->providerConfig[$provider])) {
280 280
             return [];
281 281
         }
282 282
 
Please login to merge, or discard this patch.