,error_levels?:string[]}> */ public function providerValidCodeParse(): iterable { return [ 'intRangeContained' => [ ' $a * @return int<-1, max> */ function scope(int $a){ return $a; }', ], 'positiveIntRange' => [ ' $a * @return positive-int */ function scope(int $a){ return $a; }', ], 'intRangeToInt' => [ ' $a * @return int */ function scope(int $a){ return $a; }', ], 'intReduced' => [ '= 500); assert($a < 5000);', 'assertions' => [ '$a===' => 'int<500, 4999>' ] ], ]; } /** * @return iterable */ public function providerInvalidCodeParse(): iterable { return [ 'intRangeNotContained' => [ ' $a * @return int<-1, 11> * @psalm-suppress InvalidReturnStatement */ function scope(int $a){ return $a; }', 'error_message' => 'InvalidReturnType', ], ]; } }