Skip to content

Commit 78c5753

Browse files
committed
style(php-cs-fixer): apply latest coding standards
1 parent 06bc819 commit 78c5753

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

src/Bridge/Laravel/Console/Commands/GenerateCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function handle(ConfigRepository $config): int
2222
$collection = $this->argument('collection');
2323
$collectionExists = $config->collections()->has($collection);
2424

25-
if (false === $collectionExists) {
25+
if ($collectionExists === false) {
2626
$this->error('Collection "' . $collection . '" does not exist.');
2727

2828
return self::FAILURE;

src/Config.php

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,26 @@ final class Config implements ConfigRepository
2121
];
2222

2323
private readonly bool $onFly;
24+
2425
private readonly array $frontend;
2526

2627
private readonly Collection $collections;
2728

29+
public function __construct(
30+
bool $onFly,
31+
array $frontend,
32+
array $collections,
33+
) {
34+
$this->onFly = $onFly;
35+
$this->frontend = $frontend;
36+
$this->collections = new Collection($collections);
37+
}
38+
2839
public static function fromArray(array $config): self
2940
{
3041
$missingAttributes = array_diff(self::REQUIRED_FIELDS, array_keys($config));
3142

32-
if ([] !== $missingAttributes) {
43+
if ($missingAttributes !== []) {
3344
throw MissingRequiredAttributes::fromArray(
3445
implode(',', $missingAttributes)
3546
);
@@ -42,16 +53,6 @@ public static function fromArray(array $config): self
4253
);
4354
}
4455

45-
public function __construct(
46-
bool $onFly,
47-
array $frontend,
48-
array $collections,
49-
) {
50-
$this->onFly = $onFly;
51-
$this->frontend = $frontend;
52-
$this->collections = new Collection($collections);
53-
}
54-
5556
public function onFly(): bool
5657
{
5758
return $this->onFly;

0 commit comments

Comments
 (0)