Skip to content

Commit fff8ce7

Browse files
committed
Run mago and rector
1 parent 4792f58 commit fff8ce7

4 files changed

Lines changed: 9 additions & 3 deletions

File tree

mago.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ excludes = [
1515
"**/*.expected.php",
1616
"**/.tempest",
1717
"./vendor/rector", #see https://github.com/carthage-software/mago/issues/1237 rector clashes and throws errors in tests
18+
"packages/intl/bin/plural-rules.php",
1819
]
1920

2021
[formatter]
@@ -65,3 +66,6 @@ prefer-first-class-callable = { enabled = false } # enable when arguments are fi
6566
strict-behavior = { allow-loose-behavior = true }
6667
no-redundant-use = { enabled = true }
6768
no-empty-comment = { enabled = false }
69+
single-class-per-file = { enabled = false }
70+
no-isset = { enabled = false }
71+
instanceof-stringable = { enabled = false }

packages/database/src/QueryStatements/CreateTableStatement.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,9 +400,9 @@ public function compile(DatabaseDialect $dialect): string
400400
new TableDefinition($this->tableName),
401401
arr($this->statements)
402402
// Remove BelongsTo for sqlLite as it does not support those queries
403-
->filter(fn (QueryStatement $queryStatement) => ! ($dialect === DatabaseDialect::SQLITE && $queryStatement instanceof BelongsToStatement))
404-
->map(fn (QueryStatement $queryStatement) => str($queryStatement->compile($dialect))->trim()->replace(' ', ' '))
405-
->filter(fn (ImmutableString $str) => $str->isNotEmpty())
403+
->filter(static fn (QueryStatement $queryStatement) => ! ($dialect === DatabaseDialect::SQLITE && $queryStatement instanceof BelongsToStatement))
404+
->map(static fn (QueryStatement $queryStatement) => str($queryStatement->compile($dialect))->trim()->replace(' ', ' '))
405+
->filter(static fn (ImmutableString $str) => $str->isNotEmpty())
406406
->implode(', ' . PHP_EOL . ' ')
407407
->wrap(before: PHP_EOL . ' ', after: PHP_EOL)
408408
->toString(),

rector.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
__DIR__ . '/src',
3030
__DIR__ . '/tests',
3131
])
32+
->withSkipPath(__DIR__ . '/tests/PHPStan/QueryFunctionDynamicReturnTypeExtension.php')
3233
->withConfiguredRule(AddSensitiveParameterAttributeRector::class, [
3334
'sensitive_parameters' => [
3435
'password',

tests/Integration/Database/Builder/IsDatabaseModelTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,7 @@ public function test_on_database_does_not_mutate_original(): void
771771

772772
// Original still works against default database
773773
$foo->update(bar: 'updated');
774+
774775
$refreshed = Foo::get($foo->id);
775776

776777
$this->assertSame('updated', $refreshed->bar);

0 commit comments

Comments
 (0)