Skip to content

Commit

Permalink
bump (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba authored Sep 29, 2023
1 parent b596dde commit 857d617
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 12 deletions.
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"nikic/php-parser": "^4.16",
"nette/utils": "^3.2.9 || ^4.0",
"webmozart/assert": "^1.11",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan": "^1.10.35",
"symplify/rule-doc-generator-contracts": "^11.1.26"
},
"require-dev": {
"symplify/phpstan-extensions": "^11.2",
"symplify/phpstan-extensions": "^11.4",
"symplify/rule-doc-generator": "^12.0",
"phpunit/phpunit": "^10.3",
"symfony/framework-bundle": "6.1.*",
Expand All @@ -21,10 +21,10 @@
"symplify/easy-ci": "^11.3",
"phpstan/extension-installer": "^1.3",
"php-parallel-lint/php-parallel-lint": "^1.3",
"illuminate/console": "^10.9",
"tomasvotruba/unused-public": "^0.1.10",
"tomasvotruba/type-coverage": "^0.2.0",
"tomasvotruba/class-leak": "0.1.1.72"
"illuminate/console": "^10.25",
"tomasvotruba/unused-public": "^0.3",
"tomasvotruba/type-coverage": "^0.2",
"tomasvotruba/class-leak": "^0.1"
},
"autoload": {
"psr-4": {
Expand Down
7 changes: 7 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
includes:
- config/services/services.neon
- config/naming-rules.neon

parameters:
level: 8

Expand Down Expand Up @@ -49,3 +53,6 @@ parameters:
# overly detailed
- '#Class Symplify\\PHPStanRules\\(.*?) extends generic class PHPStan\\Testing\\RuleTestCase but does not specify its types\: TRule#'
- '#Method Symplify\\PHPStanRules\\(.*?)\:\:getRule\(\) return type with generic interface PHPStan\\Rules\\Rule does not specify its types\: TNodeType#'

# part of public contract
- '#Public constant "Symplify\\PHPStanRules\\(.*?)\:\:ERROR_MESSAGE" is never used#'
9 changes: 4 additions & 5 deletions src/Rules/CheckTypehintCallerTypeRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

namespace Symplify\PHPStanRules\Rules;

use PhpParser\Node\Expr\Variable;
use PhpParser\Node\Expr;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Expr\Variable;
use PhpParser\Node\Name\FullyQualified;
use PhpParser\Node\Param;
use PhpParser\Node\Stmt\ClassMethod;
Expand All @@ -21,7 +21,6 @@
use PHPStan\Type\IntersectionType;
use PHPStan\Type\MixedType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\ThisType;
use PHPStan\Type\Type;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
Expand Down Expand Up @@ -66,8 +65,8 @@ public function processNode(Node $node, Scope $scope): array
return [];
}

if (!$node->var instanceof Variable
|| !is_string($node->var->name)
if (! $node->var instanceof Variable
|| ! is_string($node->var->name)
|| $node->var->name !== 'this'
) {
return [];
Expand Down
2 changes: 1 addition & 1 deletion src/Rules/ClassNameRespectsParentSuffixRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ final class ClassNameRespectsParentSuffixRule implements Rule, DocumentedRuleInt
public const ERROR_MESSAGE = 'Class should have suffix "%s" to respect parent type';

/**
* @var class-string[]
* @var string[]
*/
private const DEFAULT_PARENT_CLASSES = [
Command::class,
Expand Down
3 changes: 3 additions & 0 deletions src/Rules/Explicit/ExplicitClassPrefixSuffixRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,19 @@
final class ExplicitClassPrefixSuffixRule implements Rule, DocumentedRuleInterface
{
/**
* @api
* @var string
*/
public const INTERFACE_ERROR_MESSAGE = 'Interface must be suffixed with "Interface" exclusively';

/**
* @api
* @var string
*/
public const TRAIT_ERROR_MESSAGE = 'Trait must be suffixed by "Trait" exclusively';

/**
* @api
* @var string
*/
public const ABSTRACT_ERROR_MESSAGE = 'Abstract class must be prefixed by "Abstract" exclusively';
Expand Down

0 comments on commit 857d617

Please sign in to comment.