[ 'code' => ' [ 'code' => ' [ 'code' => ' [ 'code' => ' [ 'code' => ' [ 'code' => ' $_) {} echo (string) $i; }', ], 'allowToStringAfterMethodExistsCheck' => [ 'code' => ' [ 'code' => '__toString(); } class A { /** @psalm-return non-empty-string */ function __toString(): string { return "ha"; } }' ], 'intersectionCanBeString' => [ 'code' => ' [ 'code' => ' [], 'ignored_issues' => [], 'php_version' => '8.0' ], 'implicitStringable' => [ 'code' => ' [], 'ignored_issues' => [], 'php_version' => '8.0', ], 'toStringNever' => [ 'code' => ' [ 'code' => ' [ 'code' => ' 'InvalidArgument', ], 'echoCastClass' => [ 'code' => ' 'InvalidCast', ], 'invalidToStringReturnType' => [ 'code' => ' 'InvalidToString', ], 'invalidInferredToStringReturnType' => [ 'code' => ' 'InvalidToString', ], 'invalidInferredToStringReturnTypeWithTruePhp8' => [ 'code' => ' 'InvalidToString', 'ignored_issues' => [], 'php_version' => '8.0' ], 'implicitCastWithStrictTypes' => [ 'code' => ' 'InvalidArgument', ], 'implicitCastWithStrictTypesToEchoOrSprintf' => [ 'code' => ' 'ImplicitToStringCast', ], 'implicitCast' => [ 'code' => ' 'ImplicitToStringCast', ], 'implicitCastToUnion' => [ 'code' => ' 'ImplicitToStringCast', ], 'implicitCastFromInterface' => [ 'code' => ' 'ImplicitToStringCast', ], 'resourceCannotBeCoercedToString' => [ 'code' => ' 'InvalidArgument', ], 'resourceOrFalseToString' => [ 'code' => ' 'PossiblyInvalidCast', ], 'cannotCastInsideString' => [ 'code' => ' 'InvalidCast', ], 'warnAboutNullableCast' => [ 'code' => ' 'ImplicitToStringCast', ], 'possiblyInvalidCastOnIsSubclassOf' => [ 'code' => ' 'PossiblyInvalidOperand', ], 'allowToStringAfterMethodExistsCheckWithTypo' => [ 'code' => ' 'InvalidCast', ], 'alwaysEvaluateToStringVar' => [ 'code' => ' 'UndefinedGlobalVariable', ], 'implicitStringableDisallowed' => [ 'code' => ' 'InvalidArgument', 'ignored_issues' => [], 'php_version' => '7.4', ], 'implicitCastInArray' => [ 'code' => ' */ function f(S $s): array { return [$s]; } ', 'error_message' => 'ImplicitToStringCast' ], 'implicitCastInList' => [ 'code' => ' */ function f(S $s): array { return [$s]; } ', 'error_message' => 'ImplicitToStringCast' ], 'implicitCastInTuple' => [ 'code' => ' 'ImplicitToStringCast' ], 'implicitCastInShape' => [ 'code' => ' 'ImplicitToStringCast' ], 'implicitCastInIterable' => [ 'code' => ' */ function f(S $s) { return [$s]; } ', 'error_message' => 'ImplicitToStringCast' ], 'implicitCastInToString' => [ 'code' => ' 'ImplicitToStringCast' ], 'toStringTypecastNonString' => [ 'code' => ' 'InvalidCast', ], 'riskyArrayToIntCast' => [ 'code' => ' 'RiskyCast', ], 'riskyArrayToFloatCast' => [ 'code' => ' 'RiskyCast', ], ]; } }