Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/Reader/Cache/CachedCount.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/Reader/FilterHandler/LikeHandler/BaseLikeHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
}
}
4 changes: 2 additions & 2 deletions src/Reader/FilterHandler/NotHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
),
),
Expand Down
4 changes: 3 additions & 1 deletion src/Writer/EntityWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@

final class EntityWriter implements DataWriterInterface
{
public function __construct(private EntityManagerInterface $entityManager) {}
public function __construct(private EntityManagerInterface $entityManager)
{
}

/**
* @throws Throwable
Expand Down
4 changes: 3 additions & 1 deletion tests/Support/NotSupportedFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@

use Yiisoft\Data\Reader\FilterInterface;

final class NotSupportedFilter implements FilterInterface {}
final class NotSupportedFilter implements FilterInterface
{
}
4 changes: 3 additions & 1 deletion tests/Support/StubFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@

use Yiisoft\Data\Reader\FilterInterface;

final class StubFilter implements FilterInterface {}
final class StubFilter implements FilterInterface
{
}