Skip to content

Commit

Permalink
build: lint fixes with latest ECS/Rector + lock dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
pionl committed Oct 4, 2022
1 parent 50c7eb2 commit 11e9733
Show file tree
Hide file tree
Showing 13 changed files with 43 additions and 31 deletions.
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@
},
"require-dev": {
"mockery/mockery": "^1.5.0",
"nette/php-generator": "^v4.0.3",
"nikic/php-parser": "v4.14.0",
"nunomaduro/larastan": "^2.1.11",
"orchestra/testbench": "^v7.5.0",
"phpstan/phpstan": "^1.8.0",
"nette/php-generator": "v4.0.3",
"nikic/php-parser": "v4.15.1",
"nunomaduro/larastan": "2.2.0",
"orchestra/testbench": "^v7.8.0",
"phpstan/phpstan": "1.8.6",
"phpstan/phpstan-deprecation-rules": "^1.0.0",
"phpstan/phpstan-mockery": "^1.1.0",
"phpstan/phpstan-phpunit": "^1.1.1",
"phpunit/phpunit": "^9.5.21",
"rector/rector": "^0.13.7",
"symplify/easy-coding-standard": "^11.0.6"
"rector/rector": "0.14.5",
"symplify/easy-coding-standard": "11.1.10"
},
"scripts": {
"post-autoload-dump": [
Expand Down
5 changes: 3 additions & 2 deletions src/Cache/Actions/AbstractGetCacheAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
*/
abstract class AbstractGetCacheAction
{
public function __construct(protected CacheMeService $cacheMeService)
{
public function __construct(
protected CacheMeService $cacheMeService
) {
}
}
5 changes: 3 additions & 2 deletions src/Config/AbstractConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ abstract class AbstractConfig
{
private readonly string $configFileName;

public function __construct(private readonly Repository $config)
{
public function __construct(
private readonly Repository $config
) {
$this->configFileName = $this->getConfigFileName();
}

Expand Down
5 changes: 3 additions & 2 deletions src/Context/Services/ContextCallService.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@

class ContextCallService
{
public function __construct(private readonly Container $container)
{
public function __construct(
private readonly Container $container
) {
}

public function createState(AbstractContext $context, callable $createState): ContextValueContract
Expand Down
5 changes: 3 additions & 2 deletions src/Context/Values/BoolContextValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@

class BoolContextValue implements ContextValueContract
{
public function __construct(private readonly bool $is)
{
public function __construct(
private readonly bool $is
) {
}

public function isValid(): bool
Expand Down
5 changes: 3 additions & 2 deletions src/Database/Actions/RunInTransactionAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@

class RunInTransactionAction implements RunInTransactionActionContract
{
public function __construct(private readonly Connection $connection)
{
public function __construct(
private readonly Connection $connection
) {
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
*/
abstract class AbstractDispatchChangesEventsListener
{
public function __construct(private readonly Dispatcher $eventDispatcher)
{
public function __construct(
private readonly Dispatcher $eventDispatcher
) {
}

/**
Expand Down
5 changes: 3 additions & 2 deletions src/Database/Scopes/GroupByScope.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ class GroupByScope extends AbstractScope
/**
* @param array<string> $groups
*/
public function __construct(private readonly array $groups)
{
public function __construct(
private readonly array $groups
) {
}

public function apply(Builder $builder, Model $model): void
Expand Down
5 changes: 3 additions & 2 deletions src/Database/Scopes/SelectScope.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ class SelectScope extends AbstractScope
/**
* @param string[] $columns
*/
public function __construct(private readonly array $columns)
{
public function __construct(
private readonly array $columns
) {
}

public function apply(Builder $builder, Model $model): void
Expand Down
5 changes: 3 additions & 2 deletions src/Http/Resources/CreatedResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@

class CreatedResource extends MessageResource
{
public function __construct(private readonly int|string|null $id)
{
public function __construct(
private readonly int|string|null $id
) {
parent::__construct(HttpMessage::Created);
}

Expand Down
5 changes: 3 additions & 2 deletions src/Logger/Services/LogToOutputService.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@

class LogToOutputService implements LoggerInterface
{
public function __construct(private readonly StyleInterface $output)
{
public function __construct(
private readonly StyleInterface $output
) {
}

public function emergency(string|Stringable $message, array $context = []): void
Expand Down
5 changes: 3 additions & 2 deletions src/Testing/Laravel/Filesystem/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ class Filesystem implements FilesystemContract, Cloud
*/
public array $exists = [];

public function __construct(public readonly string $diskName = 'default')
{
public function __construct(
public readonly string $diskName = 'default'
) {
}

public function exists($path)
Expand Down
5 changes: 3 additions & 2 deletions src/Validation/Rules/PerPageRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@

class PerPageRule implements Rule
{
public function __construct(private readonly int $max = 100)
{
public function __construct(
private readonly int $max = 100
) {
}

public function passes($attribute, $value)
Expand Down

0 comments on commit 11e9733

Please sign in to comment.