[ '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; } } ', ], '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"); } }', ], ]; } /** * @return array */ public function providerFileCheckerInvalidCodeParse() { return [ 'getClassArgWrongClass' => [ 'barBar(); break; }', 'error_message' => 'UndefinedMethod', ], 'getClassMissingClass' => [ ' 'UndefinedClass', ], 'getTypeNotAType' => [ ' 'UnevaluatedCode', ], 'getTypeArgWrongArgs' => [ ' 'InvalidScalarArgument', ], ]; } }