Skip to content

Commit

Permalink
chore: add missing types (#214)
Browse files Browse the repository at this point in the history
* chore: add missing types

* cs

* fix ci
  • Loading branch information
priyadi authored Sep 18, 2024
1 parent cbf1a24 commit 334feb7
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ jobs:
- name: Validate php-cs-fixer
run: |
PHP_CS_FIXER_IGNORE_ENV=1 tools/php-cs-fixer check --allow-risky=yes -q
if: matrix.php != '8.4'

- name: Load fixtures
run: make fixtures
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

# 0.18.1

* chore: add missing types

# 0.18.0

* test: add phpat architecture tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ final class KeysetExpressionSQLVisitor extends ExpressionVisitor
private array $valueHashToTemplate = [];

#[\Override]
public function walkComparison(Comparison $comparison)
public function walkComparison(Comparison $comparison): mixed
{
/** @var string */
$value = $this->dispatch($comparison->getValue());
Expand Down Expand Up @@ -85,7 +85,7 @@ private function getTemplateForValue(mixed $value): string
}

#[\Override]
public function walkCompositeExpression(CompositeExpression $expr)
public function walkCompositeExpression(CompositeExpression $expr): mixed
{
$expressionList = [];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,13 @@ public function __construct(
private readonly ProcessorInterface $decorated,
) {}

public function process(mixed $data, Operation $operation, array $uriVariables = [], array $context = []): mixed
{
#[\Override]
public function process(
mixed $data,
Operation $operation,
array $uriVariables = [],
array $context = [],
): mixed {
if (
!($request = $context['request'] ?? null)
|| !$request instanceof Request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function __construct()
}

#[\Override]
public function walkComparison(Comparison $comparison)
public function walkComparison(Comparison $comparison): mixed
{
/** @var mixed */
$value = $this->dispatch($comparison->getValue());
Expand Down Expand Up @@ -75,7 +75,7 @@ public function walkValue(Value $value): mixed
}

#[\Override]
public function walkCompositeExpression(CompositeExpression $expr)
public function walkCompositeExpression(CompositeExpression $expr): mixed
{
$expressionList = [];

Expand Down
2 changes: 1 addition & 1 deletion tests/src/App/Controller/DemoController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
class DemoController extends AbstractController
{
public function __construct(
private PageableGenerators $pageableGenerators,
private readonly PageableGenerators $pageableGenerators,
) {}

#[Route('/', name: 'index')]
Expand Down

0 comments on commit 334feb7

Please sign in to comment.