Passed
Push — master ( b28f46...37d7ff )
by du
01:49
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
     }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         $providerInstance = [];
98 98
 
99 99
         foreach ($this->getProviders() as $provider) {
100
-            if (! isset($this->instances[$provider])) {
100
+            if (!isset($this->instances[$provider])) {
101 101
                 $this->instances[$provider] = $this->createProvider($provider);
102 102
             }
103 103
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 
124 124
         $class = __NAMESPACE__ . "\Strategies\\{$shortName}";
125 125
 
126
-        if (! class_exists($class)) {
126
+        if (!class_exists($class)) {
127 127
             throw new IpProviderClassNotExistException("{$class} 不存在");
128 128
         }
129 129
 
@@ -154,11 +154,11 @@  discard block
 block discarded – undo
154 154
     {
155 155
         $response = $this->getOriginalInfo();
156 156
 
157
-        if (! $response['success']) {
157
+        if (!$response['success']) {
158 158
             return (new NullDataMapper())->setInfo(['ip' => $this->getIp()]);
159 159
         }
160 160
 
161
-        if (! $this->dataMapper) {
161
+        if (!$this->dataMapper) {
162 162
             $this->dataMapper = new DataMapper();
163 163
 
164 164
             return $this->dataMapper->setInfo($response);
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
      */
175 175
     public function getRequestHandler()
176 176
     {
177
-        if (! $this->requestHandler) {
177
+        if (!$this->requestHandler) {
178 178
             return $this->requestHandler = new RequestHandler();
179 179
         }
180 180
 
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
      */
251 251
     public function getIp()
252 252
     {
253
-        if (! $this->ip) {
253
+        if (!$this->ip) {
254 254
             throw new \Exception('请先设置 ip');
255 255
         }
256 256
 
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
      */
280 280
     public function getProviderConfig(string $provider)
281 281
     {
282
-        if (! isset($this->providerConfig[$provider])) {
282
+        if (!isset($this->providerConfig[$provider])) {
283 283
             return [];
284 284
         }
285 285
 
Please login to merge, or discard this patch.