Skip to content

Commit c38402f

Browse files
committed
droped support for older PHPStan versions - 0.12 is required now
1 parent 357150b commit c38402f

File tree

2 files changed

+10
-20
lines changed

2 files changed

+10
-20
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"require": {
88
"php": "~7.1",
99
"marc-mabe/php-enum": "^1.0 || ^2.0 || ^3.0 || ^4.0",
10-
"phpstan/phpstan": "^0.10 || ^0.11 || ^0.12"
10+
"phpstan/phpstan": "^0.12"
1111
},
1212
"require-dev": {
1313
"phpunit/phpunit": "^7.5"

src/EnumMethodReflection.php

+9-19
Original file line numberDiff line numberDiff line change
@@ -63,25 +63,15 @@ public function getPrototype(): ClassMemberReflection
6363

6464
public function getVariants(): array
6565
{
66-
if (true === (new \ReflectionClass(FunctionVariant::class))->hasMethod('getTemplateTypeMap')) {
67-
return [
68-
new FunctionVariant(
69-
TemplateTypeMap::createEmpty(),
70-
TemplateTypeMap::createEmpty(),
71-
[],
72-
false,
73-
new ObjectType($this->classReflection->getName())
74-
),
75-
];
76-
} else {
77-
return [
78-
new FunctionVariant(
79-
[],
80-
false,
81-
new ObjectType($this->classReflection->getName())
82-
),
83-
];
84-
}
66+
return [
67+
new FunctionVariant(
68+
TemplateTypeMap::createEmpty(),
69+
TemplateTypeMap::createEmpty(),
70+
[],
71+
false,
72+
new ObjectType($this->classReflection->getName())
73+
),
74+
];
8575
}
8676

8777
public function getDocComment(): ?string

0 commit comments

Comments
 (0)