File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change 22
33namespace SaschaEgerer \PhpstanTypo3 \Service ;
44
5- use PHPStan \Reflection \ReflectionProvider ;
65use PHPStan \Type \Constant \ConstantStringType ;
76use PHPStan \Type \Type ;
87use ReflectionMethod ;
1110final class ValidatorClassNameResolver
1211{
1312
14- /** @var ReflectionProvider */
15- private $ reflectionProvider ;
16-
17- public function __construct (ReflectionProvider $ reflectionProvider )
18- {
19- $ this ->reflectionProvider = $ reflectionProvider ;
20- }
21-
2213 public function resolve (Type $ type ): ?string
2314 {
2415 if ( ! $ type instanceof ConstantStringType) {
2516 return null ;
2617 }
2718
28- if ($ this -> reflectionProvider -> hasClass (\TYPO3 \CMS \Extbase \Validation \ValidatorClassNameResolver::class)) {
19+ if (class_exists (\TYPO3 \CMS \Extbase \Validation \ValidatorClassNameResolver::class)) {
2920 return \TYPO3 \CMS \Extbase \Validation \ValidatorClassNameResolver::resolve ($ type ->getValue ());
3021 }
3122
32- if ( ! $ this -> reflectionProvider -> hasClass (ValidatorResolver::class)) {
23+ if (! class_exists (ValidatorResolver::class)) {
3324 return null ;
3425 }
3526
You can’t perform that action at this time.
0 commit comments