Skip to content

Commit

Permalink
Fix cs
Browse files Browse the repository at this point in the history
  • Loading branch information
tugmaks committed Feb 16, 2024
1 parent e28ce74 commit 9df1434
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 18 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
},
"require-dev": {
"ergebnis/composer-normalize": "^2.39",
"ergebnis/php-cs-fixer-config": "^6.12",
"friendsofphp/php-cs-fixer": "^3.40",
"ergebnis/php-cs-fixer-config": "^6.22",
"friendsofphp/php-cs-fixer": "^3.49",
"icanhazstring/composer-unused": "^0.8.10",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-doctrine": "^1.3",
Expand Down
6 changes: 4 additions & 2 deletions src/Locking/LockingClause.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@

final class LockingClause
{
public function __construct(private readonly LockStrength $lockStrength, private readonly ?Option $option = null)
{
public function __construct(
private readonly LockStrength $lockStrength,
private readonly ?Option $option = null,
) {
}

public function toSQL(): string
Expand Down
4 changes: 1 addition & 3 deletions src/Locking/LockingWalkerException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

namespace Tugmaks\DoctrineWalkers\Locking;

use LogicException;

final class LockingWalkerException extends LogicException
final class LockingWalkerException extends \LogicException
{
}
4 changes: 1 addition & 3 deletions src/Ordering/NullsWalkerException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

namespace Tugmaks\DoctrineWalkers\Ordering;

use LogicException;

final class NullsWalkerException extends LogicException
final class NullsWalkerException extends \LogicException
{
}
6 changes: 4 additions & 2 deletions src/Tablesample/Tablesample.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@

final class Tablesample
{
public function __construct(private readonly TablesampleMethod $tablesampleMethod, private readonly float $percentage)
{
public function __construct(
private readonly TablesampleMethod $tablesampleMethod,
private readonly float $percentage,
) {
if (0.00 > $percentage || 100.00 < $percentage) {
throw new TablesampleWalkerException('A percentage must be between 0 and 100');
}
Expand Down
2 changes: 1 addition & 1 deletion src/Tablesample/TablesampleWalker.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ final class TablesampleWalker extends SqlWalker
*/
public function walkFromClause($fromClause): string
{
/** @var array<\Doctrine\ORM\Query\AST\IdentificationVariableDeclaration> $identificationVarDecls */
/** @var list<\Doctrine\ORM\Query\AST\IdentificationVariableDeclaration> $identificationVarDecls */
$identificationVarDecls = $fromClause->identificationVariableDeclarations;
$sqlParts = [];

Expand Down
4 changes: 1 addition & 3 deletions src/Tablesample/TablesampleWalkerException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

namespace Tugmaks\DoctrineWalkers\Tablesample;

use LogicException;

final class TablesampleWalkerException extends LogicException
final class TablesampleWalkerException extends \LogicException
{
}
2 changes: 1 addition & 1 deletion tests/Locking/LockingWalkerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function testHints(LockingClause $lockingClause, string $producedSql): vo
}

/**
* @return iterable<array{0:LockingClause,1:string}>
* @return iterable<array{0:LockingClause, 1:string}>
*/
public static function lockingClauseAndSql(): iterable
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Tablesample/TablesampleWalkerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function testItThrowExceptionOnInvalidPercentage(float $percentage): void
}

/**
* @return iterable<int, array<float>>
* @return iterable<int, list<float>>
*/
public static function invalidPercentage(): iterable
{
Expand Down

0 comments on commit 9df1434

Please sign in to comment.