Skip to content

Commit f715cbf

Browse files
committed
CS fix
1 parent 3873e86 commit f715cbf

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

ecs.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
declare(strict_types=1);
44

5+
use PhpCsFixer\Fixer\LanguageConstruct\IsNullFixer;
56
use Symplify\EasyCodingStandard\Config\ECSConfig;
67
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
78

89
return function (ECSConfig $ecsConfig): void {
910
$ecsConfig->sets([SetList::PSR_12, SetList::SYMPLIFY, SetList::COMMON, SetList::CLEAN_CODE, SetList::SYMFONY]);
1011
$ecsConfig->paths([__DIR__.'/src', __DIR__.'/tests', __DIR__.'/ecs.php']);
12+
$ecsConfig->rules([IsNullFixer::class]);
1113
$ecsConfig->parallel();
1214
};

src/Aggregation/DateHistogramAggregation.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
*/
1313
class DateHistogramAggregation extends AbstractAggregation
1414
{
15-
use HasField, HasExtendedBounds; // TODO enum
15+
use HasField;
16+
use HasExtendedBounds; // TODO enum
1617

1718
/**
1819
* @param array<AbstractAggregation> $aggregations
@@ -55,7 +56,7 @@ protected function buildAggregation(): array
5556
'calendar_interval' => $this->calendarInterval,
5657
];
5758

58-
if ($this->min !== null && $this->max !== null) {
59+
if (null !== $this->min && null !== $this->max) {
5960
$build['extended_bounds']['min'] = $this->min;
6061
$build['extended_bounds']['max'] = $this->max;
6162
}

src/Aggregation/HistogramAggregation.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99

1010
class HistogramAggregation extends AbstractAggregation
1111
{
12-
use HasField, HasExtendedBounds;
12+
use HasField;
13+
use HasExtendedBounds;
1314

1415
/**
1516
* @param array<AbstractAggregation> $aggregations
@@ -50,7 +51,7 @@ protected function buildAggregation(): array
5051
'interval' => $this->interval,
5152
];
5253

53-
if ($this->min !== null && $this->max !== null) {
54+
if (null !== $this->min && null !== $this->max) {
5455
$build['extended_bounds']['min'] = $this->min;
5556
$build['extended_bounds']['max'] = $this->max;
5657
}

src/Features/HasExtendedBounds.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ public function getMax(): ?string
3636
{
3737
return $this->max;
3838
}
39-
}
39+
}

0 commit comments

Comments
 (0)