,error_levels?:string[]}> */ public function providerValidCodeParse() { return [ 'validToString' => [ ' [ ' [ ' [ ' [ ' [ ' $_) {} echo (string) $i; }', ], ]; } /** * @return iterable */ public function providerInvalidCodeParse() { return [ 'echoClass' => [ ' 'InvalidArgument', ], 'echoCastClass' => [ ' 'InvalidCast', ], 'invalidToStringReturnType' => [ ' 'InvalidToString', ], 'invalidInferredToStringReturnType' => [ ' 'InvalidToString', ], 'implicitCastWithStrictTypes' => [ ' 'InvalidArgument', ], 'implicitCast' => [ ' 'ImplicitToStringCast', ], 'implicitCastFromInterface' => [ ' 'ImplicitToStringCast', ], 'implicitConcatenation' => [ ' 'ImplicitToStringCast', [], true ], 'resourceCannotBeCoercedToString' => [ ' 'InvalidArgument', ], 'resourceOrFalseToString' => [ ' 'InvalidCast', ], ]; } }