Skip to content

Commit ffba7f7

Browse files
committed
Apply Pint style fixes (single_line_empty_body, new_with_parentheses rules)
1 parent fea4d76 commit ffba7f7

File tree

9 files changed

+10
-18
lines changed

9 files changed

+10
-18
lines changed

src/Config.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ class Config
88
{
99
public function __construct(
1010
protected ConfigRepository $repository
11-
) {
12-
}
11+
) {}
1312

1413
/**
1514
* Get directory where log files should be saved.

src/Events/QueryLogWritten.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@ public function __construct(
1212
public int $loggedQueryCount,
1313
public string $reportHeader,
1414
public array $reportQueries,
15-
) {
16-
}
15+
) {}
1716
}

src/FileName.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ class FileName
1010
public function __construct(
1111
private Container $app,
1212
private Config $config
13-
) {
14-
}
13+
) {}
1514

1615
/**
1716
* Create file name for query log.

src/Formatter.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ class Formatter
1414
public function __construct(
1515
private Container $app,
1616
private Config $config
17-
) {
18-
}
17+
) {}
1918

2019
/**
2120
* Get formatted single query line(s).

src/Listeners/LogSqlQuery.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
*/
1515
public function __construct(
1616
private SqlLogger $logger,
17-
) {
18-
}
17+
) {}
1918

2019
/**
2120
* Handle the event.

src/SqlLogger.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55
use Illuminate\Support\Collection;
66
use Illuminate\Support\Facades\DB;
77

8-
class SqlLogger
8+
readonly class SqlLogger
99
{
1010
/**
1111
* SqlLogger constructor.
1212
*/
1313
public function __construct(
1414
private Writer $writer
15-
) {
16-
}
15+
) {}
1716

1817
/**
1918
* Log queries

src/SqlQuery.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ public function __construct(
1010
public float $time,
1111
public string $query,
1212
public array $bindings = []
13-
) {
14-
}
13+
) {}
1514

1615
public static function make(
1716
int $number,

src/Writer.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ public function __construct(
3232
private readonly Formatter $formatter,
3333
private readonly Config $config,
3434
private readonly FileName $fileName
35-
) {
36-
}
35+
) {}
3736

3837
/**
3938
* Set callback to determine whether query should be reported.

tests/Feature/WriterTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
$this->writer = new Writer($this->formatter, $this->config, $this->filename);
2020
$this->directory = __DIR__.'/test-dir/directory';
2121
setConfig('general.directory', $this->directory);
22-
$this->filesystem = new Filesystem();
22+
$this->filesystem = new Filesystem;
2323
});
2424

2525
afterEach(function () {

0 commit comments

Comments
 (0)