[ 'fooFoo(); break; case "B": $a->barBar(); break; }', ], 'getClassConstArg' => [ 'fooFoo(); break; case B::class: $a->barBar(); break; }', ], 'getClassExteriorArgClassConsts' => [ 'getMessage(); break; case LogicException::class: $e->getMessage(); break; } } ', ], 'getClassExteriorArg' => [ 'getMessage(); break; case "LogicException": $e->getMessage(); break; } }', ], 'switchGetClassVar' => [ 'foo(); break; } }', ], 'getTypeArg' => [ ' [ 'a !== null: return $obj->a; // definitely not null case !is_null($obj->b): return $obj->b; // definitely not null default: throw new \InvalidArgumentException("$obj->a or $obj->b must be set"); } }', ], 'switchMoTruthy' => [ 'a: return $obj->a; // definitely not null case $obj->b: return $obj->b; // definitely not null default: throw new \InvalidArgumentException("$obj->a or $obj->b must be set"); } }', ], 'switchWithBadBreak' => [ ' [ ' [ ' [ '$x' => 'bool', '$y' => 'bool', ], ], 'continueIsBreak' => [ ' [ ' [ ' 'InvalidNullableReturnType', ], 'switchReturnTypeWithFallthroughAndConditionalBreak' => [ ' 'InvalidNullableReturnType', ], 'switchReturnTypeWithNoDefault' => [ ' 'InvalidNullableReturnType', ], 'getClassArgWrongClass' => [ 'barBar(); break; }', 'error_message' => 'UndefinedMethod', ], 'getClassMissingClass' => [ ' 'UndefinedClass', ], 'getTypeNotAType' => [ ' 'UnevaluatedCode', ], 'getTypeArgWrongArgs' => [ ' 'InvalidScalarArgument', ], 'switchBadMethodCallInCase' => [ ' 'InvalidScalarArgument', ], 'continueIsNotBreak' => [ ' 'ContinueOutsideLoop', ], 'defaultAboveCaseThatBreaks' => [ ' 'InvalidReturnType', ], ]; } }