Skip to content

Commit

Permalink
Minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Aug 23, 2024
1 parent fa0cde6 commit 127f1f1
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
- Enh #855: Add array and JSON overlaps conditions (@Tigrov)
- Enh #860: Add `bit` abstract type (@Tigrov)
- Enh #862: Refactor PHP type of `ColumnSchemaInterface` instances (@Tigrov)
- Chg #865: Raise minimum PHP version to `^8.1` (@Tigrov)
- Enh #865: Raise minimum PHP version to `^8.1` (@Tigrov, @vjik)
- Enh #798: Allow `QueryInterface::one()` and `QueryInterface::all()` to return objects (@darkdef, @Tigrov)

## 1.3.0 March 21, 2024
Expand Down
2 changes: 0 additions & 2 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
use Rector\Config\RectorConfig;
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector;
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
use Rector\Set\ValueObject\LevelSetList;
Expand All @@ -24,7 +23,6 @@
]);

$rectorConfig->skip([
ClosureToArrowFunctionRector::class,
ReadOnlyPropertyRector::class,
NullToStrictStringFuncCallArgRector::class,
]);
Expand Down
4 changes: 1 addition & 3 deletions src/Helper/DbArrayHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ final class DbArrayHelper
public static function getColumn(array $array, string $name): array
{
return array_map(
static function (array|object $element) use ($name): mixed {
return self::getValueByPath($element, $name);
},
static fn (array|object $element): mixed => self::getValueByPath($element, $name),
$array
);
}
Expand Down
4 changes: 1 addition & 3 deletions tests/Provider/PopulateProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ public static function populateWithIndexByClosure(): array
{
return [
[
static function ($row) {
return $row['key'];
},
static fn($row) => $row['key'],
[
['key' => 'value1'],
['key' => 'value2'],
Expand Down
5 changes: 3 additions & 2 deletions tests/Support/Stub/DQLQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ final class DQLQueryBuilder extends AbstractDQLQueryBuilder
{
protected function defaultExpressionBuilders(): array
{
return array_merge(parent::defaultExpressionBuilders(), [
return [
...parent::defaultExpressionBuilders(),
Expression::class => ExpressionBuilder::class,
]);
];
}
}

0 comments on commit 127f1f1

Please sign in to comment.