,error_levels?:string[]}> */ public function providerValidCodeParse() { return [ 'validToString' => [ ' [ ' [ ' [ ' [ ' [ ' $_) {} echo (string) $i; }', ], 'allowToStringAfterMethodExistsCheck' => [ ' */ public function providerInvalidCodeParse() { return [ 'echoClass' => [ ' 'InvalidArgument', ], 'echoCastClass' => [ ' 'InvalidCast', ], 'invalidToStringReturnType' => [ ' 'InvalidToString', ], 'invalidInferredToStringReturnType' => [ ' 'InvalidToString', ], 'implicitCastWithStrictTypes' => [ ' 'InvalidArgument', ], 'implicitCastWithStrictTypesToEchoOrSprintf' => [ ' 'ImplicitToStringCast', ], 'implicitCast' => [ ' 'ImplicitToStringCast', ], 'implicitCastToUnion' => [ ' 'ImplicitToStringCast', ], 'implicitCastFromInterface' => [ ' 'ImplicitToStringCast', ], 'implicitConcatenation' => [ ' 'ImplicitToStringCast', [], true, ], 'resourceCannotBeCoercedToString' => [ ' 'InvalidArgument', ], 'resourceOrFalseToString' => [ ' 'PossiblyInvalidCast', ], 'cannotCastInsideString' => [ ' 'InvalidCast', ], 'warnAboutNullableCast' => [ ' 'ImplicitToStringCast', ], 'possiblyInvalidCastOnIsSubclassOf' => [ ' 'PossiblyInvalidOperand', ], 'allowToStringAfterMethodExistsCheckWithTypo' => [ ' 'InvalidCast', ], ]; } }