Skip to content

Commit

Permalink
Merge pull request #726 from nextras/renovate/phpstan-packages
Browse files Browse the repository at this point in the history
chore(deps): update dependency phpstan/phpstan to v2.1.3
  • Loading branch information
hrach authored Feb 8, 2025
2 parents af22260 + ed427e6 commit 4d9652b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions .phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ parameters:
treatPhpDocTypesAsCertain: false
reportUnmatchedIgnoredErrors: false
ignoreErrors:
- { identifier: generics.callSiteVarianceRedundant }
- '#Call to static method Tester\\Assert::type\(\).+will always evaluate to true\.#'

services:
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"nette/tester": "~2.5",
"mockery/mockery": ">=1.5.1",
"phpstan/extension-installer": "1.4.3",
"phpstan/phpstan": "2.1.1",
"phpstan/phpstan": "2.1.3",
"phpstan/phpstan-deprecation-rules": "2.0.1",
"phpstan/phpstan-nette": "2.0.2",
"phpstan/phpstan-mockery": "2.0.0",
Expand Down
4 changes: 3 additions & 1 deletion src/Collection/DbalCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Nextras\Orm\Collection\Helpers\DbalQueryBuilderHelper;
use Nextras\Orm\Collection\Helpers\FetchPairsHelper;
use Nextras\Orm\Entity\IEntity;
use Nextras\Orm\Exception\InvalidStateException;
use Nextras\Orm\Exception\MemberAccessException;
use Nextras\Orm\Exception\NoResultException;
use Nextras\Orm\Mapper\Dbal\DbalMapper;
Expand Down Expand Up @@ -369,7 +370,8 @@ protected function getIteratorCount(): int
$sql = 'SELECT COUNT(*) AS count FROM (' . $builder->getQuerySql() . ') temp';
$args = $builder->getQueryParameters();

$this->resultCount = $this->connection->queryArgs($sql, $args)->fetchField();
$this->resultCount = $this->connection->queryArgs($sql, $args)->fetchField()
?? throw new InvalidStateException("Unable to fetch collection count.");
}

return $this->resultCount;
Expand Down
8 changes: 4 additions & 4 deletions src/Entity/Reflection/ModifierParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function matchModifiers(string $input): array


/**
* @param ReflectionClass<object> $reflectionClass
* @param ReflectionClass<covariant object> $reflectionClass
* @return array{string, array<int|string, mixed>}
* @throws InvalidModifierDefinitionException
*/
Expand Down Expand Up @@ -76,7 +76,7 @@ private function processName(TokenStream $iterator): string


/**
* @param ReflectionClass<object> $reflectionClass
* @param ReflectionClass<covariant object> $reflectionClass
* @return array<int|string, mixed>
*/
private function processArgs(
Expand Down Expand Up @@ -154,7 +154,7 @@ private function processArgs(


/**
* @param ReflectionClass<object> $reflectionClass
* @param ReflectionClass<covariant object> $reflectionClass
*/
private function processValue(Token $token, ReflectionClass $reflectionClass): mixed
{
Expand All @@ -169,7 +169,7 @@ private function processValue(Token $token, ReflectionClass $reflectionClass): m


/**
* @param ReflectionClass<object> $reflectionClass
* @param ReflectionClass<covariant object> $reflectionClass
*/
private function processKeyword(string $value, ReflectionClass $reflectionClass): mixed
{
Expand Down

0 comments on commit 4d9652b

Please sign in to comment.