Skip to content

Commit 73f3864

Browse files
committed
Lint
1 parent 08e5721 commit 73f3864

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

src/Services/MaxMindDatabase.php

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,16 @@ class MaxMindDatabase extends AbstractService
2323
public function boot()
2424
{
2525
$path = $this->config('database_path');
26+
2627
// Copy test database for now
27-
if (file_exists($path) === false) {
28+
if (is_file($path) === false) {
2829
mkdir(str_replace('/geoip.mmdb', '', $path));
2930
copy(__DIR__ . '/../../resources/geoip.mmdb', $path);
3031
}
3132

32-
$this->reader = new Reader( $path, $this->config('locales', ['en']));
33+
$this->reader = new Reader(
34+
$path, $this->config('locales', ['en'])
35+
);
3336
}
3437

3538
/**
@@ -89,7 +92,8 @@ public function update()
8992
* Provide a temporary directory to perform operations in and and ensure
9093
* it is removed afterwards.
9194
*
92-
* @param callable $callback
95+
* @param callable $callback
96+
*
9397
* @return void
9498
*/
9599
protected function withTemporaryDirectory(callable $callback)
@@ -112,7 +116,8 @@ protected function withTemporaryDirectory(callable $callback)
112116
/**
113117
* Recursively search the given archive to find the .mmdb file.
114118
*
115-
* @param \PharData $archive
119+
* @param \PharData $archive
120+
*
116121
* @return mixed
117122
* @throws \Exception
118123
*/
@@ -134,16 +139,17 @@ protected function findDatabaseFile($archive)
134139
/**
135140
* Recursively delete the given directory.
136141
*
137-
* @param string $directory
142+
* @param string $directory
143+
*
138144
* @return mixed
139145
*/
140146
protected function deleteDirectory(string $directory)
141147
{
142-
if (!file_exists($directory)) {
148+
if (! file_exists($directory)) {
143149
return true;
144150
}
145151

146-
if (!is_dir($directory)) {
152+
if (! is_dir($directory)) {
147153
return unlink($directory);
148154
}
149155

@@ -152,7 +158,7 @@ protected function deleteDirectory(string $directory)
152158
continue;
153159
}
154160

155-
if (!$this->deleteDirectory($directory . DIRECTORY_SEPARATOR . $item)) {
161+
if (! $this->deleteDirectory($directory . DIRECTORY_SEPARATOR . $item)) {
156162
return false;
157163
}
158164
}

0 commit comments

Comments
 (0)