Skip to content

Commit 45941c6

Browse files
authored
Make the type annotation for CompositeExpression::count more specific (#6188)
This helps static analysis. | Q | A |------------- | ----------- | Type | improvement | Fixed issues | (none) #### Summary `count` cannot return a negative number. Add a PHPDoc annotation to make this clear for static analysis.
1 parent d3954ec commit 45941c6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Query/Expression/CompositeExpression.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ public function with($part, ...$parts): self
149149
* Retrieves the amount of expressions on composite expression.
150150
*
151151
* @return int
152+
* @psalm-return int<0, max>
152153
*/
153154
#[ReturnTypeWillChange]
154155
public function count()

0 commit comments

Comments
 (0)