From e73d038b688e83e93499fd3642689ac69bbd561d Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Wed, 21 Jan 2026 21:52:20 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Reader/Cache/CachedCount.php | 4 +++- src/Reader/FilterHandler/LikeHandler/BaseLikeHandler.php | 6 +++--- src/Reader/FilterHandler/NotHandler.php | 4 ++-- src/Writer/EntityWriter.php | 4 +++- tests/Support/NotSupportedFilter.php | 4 +++- tests/Support/StubFilter.php | 4 +++- 6 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/Reader/Cache/CachedCount.php b/src/Reader/Cache/CachedCount.php index e4b3e2c..429561e 100644 --- a/src/Reader/Cache/CachedCount.php +++ b/src/Reader/Cache/CachedCount.php @@ -13,7 +13,9 @@ final class CachedCount */ private ?int $count = null; - public function __construct(private ?Countable $collection) {} + public function __construct(private ?Countable $collection) + { + } /** * @psalm-internal Yiisoft\Data\Cycle\Reader diff --git a/src/Reader/FilterHandler/LikeHandler/BaseLikeHandler.php b/src/Reader/FilterHandler/LikeHandler/BaseLikeHandler.php index 5cc3630..8109ca8 100644 --- a/src/Reader/FilterHandler/LikeHandler/BaseLikeHandler.php +++ b/src/Reader/FilterHandler/LikeHandler/BaseLikeHandler.php @@ -29,9 +29,9 @@ protected function prepareValue(string|Stringable $value, LikeMode $mode): strin $value = strtr((string) $value, $this->escapingReplacements); return match ($mode) { - LikeMode::Contains => '%' . $value . '%', - LikeMode::StartsWith => $value . '%', - LikeMode::EndsWith => '%' . $value, + LikeMode::Contains => '%'.$value.'%', + LikeMode::StartsWith => $value.'%', + LikeMode::EndsWith => '%'.$value, }; } } diff --git a/src/Reader/FilterHandler/NotHandler.php b/src/Reader/FilterHandler/NotHandler.php index 0a9ca0a..457b198 100644 --- a/src/Reader/FilterHandler/NotHandler.php +++ b/src/Reader/FilterHandler/NotHandler.php @@ -62,13 +62,13 @@ private function convertFilter(FilterInterface $filter, int $notCount = 1): Filt return match ($filter::class) { AndX::class => new OrX( ...array_map( - static fn(FilterInterface $subFilter): FilterInterface => $handler->convertFilter($subFilter), + static fn (FilterInterface $subFilter): FilterInterface => $handler->convertFilter($subFilter), $filter->filters, ), ), OrX::class => new AndX( ...array_map( - static fn(FilterInterface $subFilter): FilterInterface => $handler->convertFilter($subFilter), + static fn (FilterInterface $subFilter): FilterInterface => $handler->convertFilter($subFilter), $filter->filters, ), ), diff --git a/src/Writer/EntityWriter.php b/src/Writer/EntityWriter.php index c20df2e..deb562c 100644 --- a/src/Writer/EntityWriter.php +++ b/src/Writer/EntityWriter.php @@ -11,7 +11,9 @@ final class EntityWriter implements DataWriterInterface { - public function __construct(private EntityManagerInterface $entityManager) {} + public function __construct(private EntityManagerInterface $entityManager) + { + } /** * @throws Throwable diff --git a/tests/Support/NotSupportedFilter.php b/tests/Support/NotSupportedFilter.php index d416e28..d8622ba 100644 --- a/tests/Support/NotSupportedFilter.php +++ b/tests/Support/NotSupportedFilter.php @@ -6,4 +6,6 @@ use Yiisoft\Data\Reader\FilterInterface; -final class NotSupportedFilter implements FilterInterface {} +final class NotSupportedFilter implements FilterInterface +{ +} diff --git a/tests/Support/StubFilter.php b/tests/Support/StubFilter.php index ba0d02f..fd60b88 100644 --- a/tests/Support/StubFilter.php +++ b/tests/Support/StubFilter.php @@ -6,4 +6,6 @@ use Yiisoft\Data\Reader\FilterInterface; -final class StubFilter implements FilterInterface {} +final class StubFilter implements FilterInterface +{ +}