Skip to content

Commit ace4f4a

Browse files
authored
Merge pull request #17 from rossaddison/analysis-REmyr7
Apply fixes from StyleCI
2 parents 64005bb + 45e24a9 commit ace4f4a

File tree

6 files changed

+17
-9
lines changed

6 files changed

+17
-9
lines changed

src/Reader/Cache/CachedCount.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ final class CachedCount
1313
*/
1414
private ?int $count = null;
1515

16-
public function __construct(private ?Countable $collection) {}
16+
public function __construct(private ?Countable $collection)
17+
{
18+
}
1719

1820
/**
1921
* @psalm-internal Yiisoft\Data\Cycle\Reader

src/Reader/FilterHandler/LikeHandler/BaseLikeHandler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ protected function prepareValue(string|Stringable $value, LikeMode $mode): strin
2929
$value = strtr((string) $value, $this->escapingReplacements);
3030

3131
return match ($mode) {
32-
LikeMode::Contains => '%' . $value . '%',
33-
LikeMode::StartsWith => $value . '%',
34-
LikeMode::EndsWith => '%' . $value,
32+
LikeMode::Contains => '%'.$value.'%',
33+
LikeMode::StartsWith => $value.'%',
34+
LikeMode::EndsWith => '%'.$value,
3535
};
3636
}
3737
}

src/Reader/FilterHandler/NotHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ private function convertFilter(FilterInterface $filter, int $notCount = 1): Filt
6262
return match ($filter::class) {
6363
AndX::class => new OrX(
6464
...array_map(
65-
static fn(FilterInterface $subFilter): FilterInterface => $handler->convertFilter($subFilter),
65+
static fn (FilterInterface $subFilter): FilterInterface => $handler->convertFilter($subFilter),
6666
$filter->filters,
6767
),
6868
),
6969
OrX::class => new AndX(
7070
...array_map(
71-
static fn(FilterInterface $subFilter): FilterInterface => $handler->convertFilter($subFilter),
71+
static fn (FilterInterface $subFilter): FilterInterface => $handler->convertFilter($subFilter),
7272
$filter->filters,
7373
),
7474
),

src/Writer/EntityWriter.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111

1212
final class EntityWriter implements DataWriterInterface
1313
{
14-
public function __construct(private EntityManagerInterface $entityManager) {}
14+
public function __construct(private EntityManagerInterface $entityManager)
15+
{
16+
}
1517

1618
/**
1719
* @throws Throwable

tests/Support/NotSupportedFilter.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@
66

77
use Yiisoft\Data\Reader\FilterInterface;
88

9-
final class NotSupportedFilter implements FilterInterface {}
9+
final class NotSupportedFilter implements FilterInterface
10+
{
11+
}

tests/Support/StubFilter.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@
66

77
use Yiisoft\Data\Reader\FilterInterface;
88

9-
final class StubFilter implements FilterInterface {}
9+
final class StubFilter implements FilterInterface
10+
{
11+
}

0 commit comments

Comments
 (0)