Skip to content

Commit

Permalink
Add type annotations to QueryInterceptor methods
Browse files Browse the repository at this point in the history
Added precise type annotations for MethodInvocation and other parameters in QueryInterceptor. This improves code readability and aids in static analysis. No functional changes were made.
  • Loading branch information
koriym committed Dec 18, 2024
1 parent eaf52fa commit 0354483
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/QueryInterceptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public function invoke(MethodInvocation $invocation)
}

/**
* @param MethodInvocation<object> $invocation
* @param array<string, mixed> $param

Check failure on line 50 in src/QueryInterceptor.php

View workflow job for this annotation

GitHub Actions / cs / Coding Standards

Expected 5 spaces after parameter type; 1 found
*
* @return mixed
Expand All @@ -62,7 +63,10 @@ private function getQueryResult(MethodInvocation $invocation, QueryInterface $qu
return $result;
}

/** @param mixed $result */
/**
* @param MethodInvocation<object> $invocation
* @param mixed $result

Check failure on line 68 in src/QueryInterceptor.php

View workflow job for this annotation

GitHub Actions / cs / Coding Standards

Expected 20 spaces after parameter type; 1 found
*/
private function returnRo(ResourceObject $ro, MethodInvocation $invocation, $result): ResourceObject
{
if (! $result) {
Expand Down

0 comments on commit 0354483

Please sign in to comment.