Skip to content

Commit 5da3387

Browse files
committed
fix rector
1 parent 021af57 commit 5da3387

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

rector.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
use Rector\Set\ValueObject\LevelSetList;
4040
use Rector\Set\ValueObject\SetList;
4141
use Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector;
42-
use Rector\Strict\Rector\If_\BooleanInIfConditionRuleFixerRector;
4342
use Rector\TypeDeclaration\Rector\Empty_\EmptyOnNullableObjectToInstanceOfRector;
4443
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector;
4544
use Rector\ValueObject\PhpVersion;
@@ -138,7 +137,6 @@
138137
$rectorConfig->rule(StringClassNameToClassConstantRector::class);
139138
$rectorConfig->rule(PrivatizeFinalClassPropertyRector::class);
140139
$rectorConfig->rule(CompleteDynamicPropertiesRector::class);
141-
$rectorConfig->rule(BooleanInIfConditionRuleFixerRector::class);
142140
$rectorConfig->rule(SingleInArrayToCompareRector::class);
143141
$rectorConfig->rule(VersionCompareFuncCallToConstantRector::class);
144142
$rectorConfig->rule(ExplicitBoolCompareRector::class);

src/Traits/HasRelations.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ private function createPivotTableName(mixed $table1, mixed $table2): string
228228
$tables = [$table1, $table2];
229229
sort($tables);
230230

231-
$tables = array_map('singular', $tables);
231+
$tables = array_map(singular(...), $tables);
232232

233233
return implode('_', $tables);
234234
}
@@ -483,7 +483,7 @@ protected function getDataForRelationByIds(array $id, Relation $relation, string
483483
),
484484
'LEFT',
485485
)
486-
->where('relation1.' . $relation->primaryKey, null)
486+
->where('relation1.' . $relation->primaryKey)
487487
->findAll();
488488
} else {
489489
$results = $relation->model->findAll();

tests/_support/Models/UuidPostModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function comments(): Relation
3737
// Transform user IDs to uppercase for user relation
3838
protected function transformUserRelationIds(array $ids): array
3939
{
40-
return array_map('strtoupper', $ids);
40+
return array_map(strtoupper(...), $ids);
4141
}
4242

4343
// Transform post IDs to binary for comments relation

tests/_support/Models/UuidUserModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ protected function transformProfileRelationIds(array $ids): array
4343
// Transform UUIDs to uppercase for posts relation
4444
protected function transformPostsRelationIds(array $ids): array
4545
{
46-
return array_map('strtoupper', $ids);
46+
return array_map(strtoupper(...), $ids);
4747
}
4848
}

0 commit comments

Comments
 (0)