Skip to content

Commit

Permalink
Apply Pint style fixes (single_line_empty_body, new_with_parentheses …
Browse files Browse the repository at this point in the history
…rules)
  • Loading branch information
onlime committed Sep 12, 2024
1 parent fea4d76 commit ffba7f7
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 18 deletions.
3 changes: 1 addition & 2 deletions src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ class Config
{
public function __construct(
protected ConfigRepository $repository
) {
}
) {}

/**
* Get directory where log files should be saved.
Expand Down
3 changes: 1 addition & 2 deletions src/Events/QueryLogWritten.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ public function __construct(
public int $loggedQueryCount,
public string $reportHeader,
public array $reportQueries,
) {
}
) {}
}
3 changes: 1 addition & 2 deletions src/FileName.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ class FileName
public function __construct(
private Container $app,
private Config $config
) {
}
) {}

/**
* Create file name for query log.
Expand Down
3 changes: 1 addition & 2 deletions src/Formatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ class Formatter
public function __construct(
private Container $app,
private Config $config
) {
}
) {}

/**
* Get formatted single query line(s).
Expand Down
3 changes: 1 addition & 2 deletions src/Listeners/LogSqlQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
*/
public function __construct(
private SqlLogger $logger,
) {
}
) {}

/**
* Handle the event.
Expand Down
5 changes: 2 additions & 3 deletions src/SqlLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\DB;

class SqlLogger
readonly class SqlLogger
{
/**
* SqlLogger constructor.
*/
public function __construct(
private Writer $writer
) {
}
) {}

/**
* Log queries
Expand Down
3 changes: 1 addition & 2 deletions src/SqlQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ public function __construct(
public float $time,
public string $query,
public array $bindings = []
) {
}
) {}

public static function make(
int $number,
Expand Down
3 changes: 1 addition & 2 deletions src/Writer.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ public function __construct(
private readonly Formatter $formatter,
private readonly Config $config,
private readonly FileName $fileName
) {
}
) {}

/**
* Set callback to determine whether query should be reported.
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/WriterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
$this->writer = new Writer($this->formatter, $this->config, $this->filename);
$this->directory = __DIR__.'/test-dir/directory';
setConfig('general.directory', $this->directory);
$this->filesystem = new Filesystem();
$this->filesystem = new Filesystem;
});

afterEach(function () {
Expand Down

0 comments on commit ffba7f7

Please sign in to comment.