Skip to content

Commit

Permalink
Update phpstan-baseline(s)
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Nov 6, 2022
1 parent 48f8635 commit 3747223
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
6 changes: 1 addition & 5 deletions build/baseline-lt-7.3.neon
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
parameters:
ignoreErrors:
-
message: "#^Call to an undefined static method PHPUnit\\\\Framework\\\\TestCase\\:\\:assertFileDoesNotExist\\(\\)\\.$#"
count: 1
path: ../src/Testing/LevelsTestCase.php
ignoreErrors: []
8 changes: 8 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,14 @@ parameters:
count: 1
path: src/Testing/PHPStanTestCase.php

-
message: """
#^Call to deprecated method isClassString\\(\\) of class PHPStan\\\\Type\\\\Constant\\\\ConstantStringType\\:
use isClassStringType\\(\\) instead$#
"""
count: 1
path: src/Type/Constant/ConstantStringType.php

-
message: """
#^Call to deprecated method getInstance\\(\\) of class PHPStan\\\\Broker\\\\Broker\\:
Expand Down
1 change: 0 additions & 1 deletion src/Dependency/DependencyResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
use PHPStan\Reflection\ParametersAcceptorWithPhpDocs;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Type\ClosureType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\FileTypeMapper;
use PHPStan\Type\ParserNodeTypeToPHPStanType;
use PHPStan\Type\Type;
Expand Down
15 changes: 6 additions & 9 deletions src/Type/Constant/ConstantStringType.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,25 +66,22 @@ public function getValue(): string

public function isClassStringType(): TrinaryLogic
{
if ($this->isClassString()) {
if ($this->isClassString) {
return TrinaryLogic::createYes();

}

return TrinaryLogic::createNo();
$reflectionProvider = ReflectionProviderStaticAccessor::getInstance();

return TrinaryLogic::createFromBoolean($reflectionProvider->hasClass($this->value));
}

/**
* @deprecated use isClassStringType() instead
*/
public function isClassString(): bool
{
if ($this->isClassString) {
return true;
}

$reflectionProvider = ReflectionProviderStaticAccessor::getInstance();

return $reflectionProvider->hasClass($this->value);
return $this->isClassStringType()->yes();
}

public function describe(VerbosityLevel $level): string
Expand Down

0 comments on commit 3747223

Please sign in to comment.