Skip to content

Commit

Permalink
Fix phpcbf
Browse files Browse the repository at this point in the history
  • Loading branch information
m1k3lm committed Oct 9, 2024
1 parent cd4f8ee commit ea72a06
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<!-- What to scan -->
<file>.</file>
<exclude-pattern>vendor/</exclude-pattern>
<exclude-pattern>.history</exclude-pattern>
<!-- How to scan -->
<!-- Usage instructions: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage -->
<!-- Annotated ruleset: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
Expand Down
4 changes: 3 additions & 1 deletion src/Infrastructure/ServiceRegister.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ public static function getInstance(): ServiceRegister
/**
* Gets service for specified type.
*
* @template T
* @param class-string<T> $type
*
* @template T
*
* @return T
*/
public static function getService(string $type)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ function ($first, $second) use ($i, $indexKey) {
private function sliceResults(QueryFilter $filter, array $result)
{
if ($filter->getLimit()) {
$result = array_slice($result, $filter->getOffset()??0, $filter->getLimit());
$result = array_slice($result, $filter->getOffset() ?? 0, $filter->getLimit());
}

return $result;
Expand Down

0 comments on commit ea72a06

Please sign in to comment.