Skip to content

Commit

Permalink
OP-441: ECS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jkindly committed Jul 23, 2024
1 parent 58269d4 commit eb876f4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Renderer/Collection/CollectionBlocksRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ public function render(CollectionInterface $collection, ?int $countToRender = nu

public function supports(CollectionInterface $collection): bool
{
return $collection->getBlocks()?->count() > 0;
return 0 < $collection->getBlocks()?->count();
}
}
2 changes: 1 addition & 1 deletion src/Renderer/Collection/CollectionMediaRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ public function render(CollectionInterface $collection, ?int $countToRender = nu

public function supports(CollectionInterface $collection): bool
{
return $collection->getMedia()?->count() > 0;
return 0 < $collection->getMedia()?->count();
}
}
2 changes: 1 addition & 1 deletion src/Renderer/Collection/CollectionPagesRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ public function render(CollectionInterface $collection, ?int $countToRender = nu

public function supports(CollectionInterface $collection): bool
{
return $collection->getPages()?->count() > 0;
return 0 < $collection->getPages()?->count();
}
}
2 changes: 1 addition & 1 deletion src/Sorter/SorterById.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class SorterById
public static function sort(array $elements, string $direction = 'asc'): array
{
usort($elements, static function ($element1, $element2) use ($direction) {
if ($direction === 'asc') {
if ('asc' === $direction) {
return $element1->getId() <=> $element2->getId();
}

Expand Down

0 comments on commit eb876f4

Please sign in to comment.