[ 'code' => 'a !== null => $obj->a, $obj->b !== null => $obj->b, default => throw new \InvalidArgumentException("$obj->a or $obj->b must be set"), }; }', 'assertions' => [], 'ignored_issues' => [], 'php_version' => '8.0', ], 'defaultAboveCase' => [ 'code' => ' "hello", default => "yellow", "b" => "goodbye", }; }', 'assertions' => [], 'ignored_issues' => [], 'php_version' => '8.0', ], 'allMatchedNoRedundantCondition' => [ 'code' => ' "hello", "b" => "goodbye", }; }', 'assertions' => [], 'ignored_issues' => [], 'php_version' => '8.0', ], 'getClassWithMethod' => [ 'code' => ' $value->hello(), default => "b", }; }', 'assertions' => [], 'ignored_issues' => [], 'php_version' => '8.0', ], 'MatchWithCount' => [ 'code' => ' throw new \InvalidArgumentException, default => $array, }; }', 'assertions' => [], 'ignored_issues' => [], 'php_version' => '8.1', ], ]; } public function providerInvalidCodeParse(): iterable { return [ 'getClassArgWrongClass' => [ 'code' => ' $a->barBar(), };', 'error_message' => 'UndefinedMethod', 'ignored_issues' => [], 'php_version' => '8.0', ], 'getClassMissingClass' => [ 'code' => ' 5, };', 'error_message' => 'UndefinedClass', 'ignored_issues' => [], 'php_version' => '8.0', ], 'allMatchedDefaultImpossible' => [ 'code' => ' "hello", "b" => "goodbye", default => "impossible", }; }', 'error_message' => 'TypeDoesNotContainType', 'ignored_issues' => [], 'php_version' => '8.0', ], 'allMatchedAnotherImpossible' => [ 'code' => ' "hello", "b" => "goodbye", "c" => "impossible", }; }', 'error_message' => 'TypeDoesNotContainType', 'ignored_issues' => [], 'php_version' => '8.0', ], 'notAllEnumsMet' => [ 'code' => ' "foo", }; }', 'error_message' => 'UnhandledMatchCondition', 'ignored_issues' => [], 'php_version' => '8.0', ], 'notAllConstEnumsMet' => [ 'code' => ' "John F Kennedy Airport", self::LHR => "London Heathrow", }; } }', 'error_message' => 'UnhandledMatchCondition', 'ignored_issues' => [], 'php_version' => '8.0', ], 'paradoxWithDuplicateValue' => [ 'code' => ' 0, 1 => 1, }; };', 'error_message' => 'ParadoxicalCondition', 'ignored_issues' => [], 'php_version' => '8.0', ], 'noCrashWithEmptyMatch' => [ 'code' => ' 'UnhandledMatchCondition', 'ignored_issues' => [], 'php_version' => '8.0', ], 'exitIsLikeThrow' => [ 'code' => ' exit(), 2, 3 => $i, }; $a === "aaa"; }', 'error_message' => 'DocblockTypeContradiction', 'ignored_issues' => [], 'php_version' => '8.0', ], 'matchTrueImpossible' => [ 'code' => ' 1, $foo instanceof \Exception => 1, };', 'error_message' => 'TypeDoesNotContainType', 'ignored_issues' => [], 'php_version' => '8.0', ], ]; } }