Skip to content

Commit 8d9870f

Browse files
authored
Merge pull request #28 from timeweb/php81
Add PHP 8.1 in CI
2 parents 8048fc9 + 7750a50 commit 8d9870f

File tree

2 files changed

+10
-20
lines changed

2 files changed

+10
-20
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77

88
strategy:
99
matrix:
10-
php: [ '7.1', '7.2', '7.3', '7.4', '8.0' ]
10+
php: [ '7.1', '7.2', '7.3', '7.4', '8.0', '8.1' ]
1111
prefer: [ 'lowest', 'stable' ]
1212

1313
name: Test on PHP ${{ matrix.php }} with ${{ matrix.prefer }} composer prefer option

src/Reflection/EnumMethodReflection.php

Lines changed: 9 additions & 19 deletions
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)