Skip to content

Commit aff4b04

Browse files
committed
Put non-important errors under the baseline
1 parent 960c71a commit aff4b04

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

phpstan-baseline.neon

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,24 @@ parameters:
576576
count: 1
577577
path: src/Rules/Generics/TemplateTypeCheck.php
578578

579+
-
580+
message: """
581+
#^Call to deprecated method getValue\\(\\) of class PHPStan\\\\Reflection\\\\ClassConstantReflection\\:
582+
Use getValueExpr\\(\\)$#
583+
"""
584+
count: 1
585+
path: src/Rules/Keywords/RequireFileExistsRule.php
586+
587+
-
588+
message: "#^Instanceof between PhpParser\\\\Node\\\\Name and PhpParser\\\\Node\\\\Name will always evaluate to true\\.$#"
589+
count: 1
590+
path: src/Rules/Keywords/RequireFileExistsRule.php
591+
592+
-
593+
message: "#^Method PHPStan\\\\Rules\\\\Keywords\\\\RequireFileExistsRule\\:\\:processNode\\(\\) should return list\\<PHPStan\\\\Rules\\\\IdentifierRuleError\\> but returns array\\{PHPStan\\\\Rules\\\\RuleError\\}\\.$#"
594+
count: 1
595+
path: src/Rules/Keywords/RequireFileExistsRule.php
596+
579597
-
580598
message: "#^Function class_implements\\(\\) is a runtime reflection concept that might not work in PHPStan because it uses fully static reflection engine\\. Use objects retrieved from ReflectionProvider instead\\.$#"
581599
count: 1

src/Rules/Keywords/RequireFileExistsRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ private function resolveClassConstant(ClassConstFetch $node): ?string
103103
$classReflection = $this->reflectionProvider->getClass($className);
104104
if ($classReflection->hasConstant($constantName)) {
105105
$constantReflection = $classReflection->getConstant($constantName);
106-
$constantValue = $constantReflection->getValueExpr();
106+
$constantValue = $constantReflection->getValue();
107107
if (is_string($constantValue)) {
108108
return $constantValue;
109109
}

0 commit comments

Comments
 (0)