Skip to content

Commit

Permalink
Fixes after PHPStan update
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Oct 4, 2024
1 parent 8d9bbb4 commit cfc20fd
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 9 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
},
"require-dev": {
"nette/application": "^3.0",
"nette/di": "^3.1.10",
"nette/forms": "^3.0",
"nette/utils": "^2.3.0 || ^3.0.0",
"php-parallel-lint/php-parallel-lint": "^1.2",
Expand Down
4 changes: 0 additions & 4 deletions src/Reflection/Nette/HtmlMethodReflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\FunctionVariant;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\MixedType;
Expand Down Expand Up @@ -43,9 +42,6 @@ public function isStatic(): bool
return false;
}

/**
* @return ParametersAcceptor[]
*/
public function getVariants(): array
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ public function isStatic(): bool
return false;
}

/**
* @return ParametersAcceptor[]
*/
public function getVariants(): array
{
return [
Expand Down
3 changes: 2 additions & 1 deletion src/Type/Nette/ServiceLocatorDynamicReturnTypeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace PHPStan\Type\Nette;

use Nette\DI\Container;
use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
Expand All @@ -18,7 +19,7 @@ class ServiceLocatorDynamicReturnTypeExtension implements DynamicMethodReturnTyp

public function getClass(): string
{
return 'Nette\DI\Container';
return Container::class;
}

public function isMethodSupported(MethodReflection $methodReflection): bool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class PresenterInjectedPropertiesExtensionTest extends LevelsTestCase
{

public function dataTopics(): array
public static function dataTopics(): array
{
if (PHP_VERSION_ID < 70400) {
self::markTestSkipped('Only for PHP 7.4+');
Expand Down

0 comments on commit cfc20fd

Please sign in to comment.