@@ -83,7 +83,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -89,7 +89,7 @@ discard block |
||
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 | /** |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | return $this->getField($field); |
126 | 126 | } |
127 | 127 | |
128 | - if (! method_exists($this, $name)) { |
|
128 | + if (!method_exists($this, $name)) { |
|
129 | 129 | throw new MethodNotExistException("{$name} 方法不存在"); |
130 | 130 | } |
131 | 131 | } |