Add support for value-of<BackedEnum> #1092
Annotations
6 warnings
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/cache@v3, actions/[email protected]. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Running mutation tests:
src/Type/Parser/Lexer/Token/ValueOfToken.php#L36
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
if ($stream->done() || !$stream->forward() instanceof ClosingBracketToken) {
throw new ClosingBracketMissing($this->symbol());
}
- if ($subType instanceof UnionType && count($subType->types()) === 1) {
+ if (false && count($subType->types()) === 1) {
$subType = $subType->types()[0];
}
if (!$subType instanceof EnumType) {
|
Running mutation tests:
src/Type/Parser/Lexer/Token/ValueOfToken.php#L36
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
if ($stream->done() || !$stream->forward() instanceof ClosingBracketToken) {
throw new ClosingBracketMissing($this->symbol());
}
- if ($subType instanceof UnionType && count($subType->types()) === 1) {
+ if ($subType instanceof UnionType && count($subType->types()) === 2) {
$subType = $subType->types()[0];
}
if (!$subType instanceof EnumType) {
|
Running mutation tests:
src/Type/Parser/Lexer/Token/ValueOfToken.php#L36
Escaped Mutant for Mutator "Identical":
--- Original
+++ New
@@ @@
if ($stream->done() || !$stream->forward() instanceof ClosingBracketToken) {
throw new ClosingBracketMissing($this->symbol());
}
- if ($subType instanceof UnionType && count($subType->types()) === 1) {
+ if ($subType instanceof UnionType && count($subType->types()) !== 1) {
$subType = $subType->types()[0];
}
if (!$subType instanceof EnumType) {
|
Running mutation tests:
src/Type/Parser/Lexer/Token/ValueOfToken.php#L40
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
if ($subType instanceof UnionType && count($subType->types()) === 1) {
$subType = $subType->types()[0];
}
- if (!$subType instanceof EnumType) {
+ if (!true) {
throw new NotBackedEnum($subType->toString());
}
$list = [];
|
Running mutation tests:
src/Type/Parser/Lexer/Token/ValueOfToken.php#L46
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
}
$list = [];
foreach ($subType->cases() as $case) {
- if (!$case instanceof BackedEnum) {
+ if (!true) {
throw new NotBackedEnum($this->symbol());
}
if (is_string($case->value)) {
|
Loading