@@ -9,15 +9,15 @@ final class DeserializerRuntimeException extends \RuntimeException
99 public static function createInvalidDataType (string $ path , string $ givenType , string $ wishedType ): self
1010 {
1111 return new self (
12- sprintf ('There is an invalid data type "%s", needed "%s" at path: "%s" ' , $ givenType , $ wishedType , $ path )
12+ \ sprintf ('There is an invalid data type "%s", needed "%s" at path: "%s" ' , $ givenType , $ wishedType , $ path )
1313 );
1414 }
1515
1616 public static function createNotParsable (string $ contentType , ?string $ error = null ): self
1717 {
18- $ message = sprintf ('Data is not parsable with content-type: "%s" ' , $ contentType );
18+ $ message = \ sprintf ('Data is not parsable with content-type: "%s" ' , $ contentType );
1919 if (null !== $ error ) {
20- $ message .= sprintf (', error: "%s" ' , $ error );
20+ $ message .= \ sprintf (', error: "%s" ' , $ error );
2121 }
2222
2323 return new self ($ message );
@@ -28,15 +28,15 @@ public static function createNotParsable(string $contentType, ?string $error = n
2828 */
2929 public static function createNotAllowedAdditionalFields (array $ paths ): self
3030 {
31- return new self (sprintf ('There are additional field(s) at paths: "%s" ' , implode ('", " ' , $ paths )));
31+ return new self (\ sprintf ('There are additional field(s) at paths: "%s" ' , implode ('", " ' , $ paths )));
3232 }
3333
3434 /**
3535 * @param array<int, string> $supportedTypes
3636 */
3737 public static function createMissingObjectType (string $ path , array $ supportedTypes ): self
3838 {
39- return new self (sprintf (
39+ return new self (\ sprintf (
4040 'Missing object type, supported are "%s" at path: "%s" ' ,
4141 implode ('", " ' , $ supportedTypes ),
4242 $ path
@@ -48,7 +48,7 @@ public static function createMissingObjectType(string $path, array $supportedTyp
4848 */
4949 public static function createInvalidObjectType (string $ path , string $ type , array $ supportedTypes ): self
5050 {
51- return new self (sprintf (
51+ return new self (\ sprintf (
5252 'Unsupported object type "%s", supported are "%s" at path: "%s" ' ,
5353 $ type ,
5454 implode ('", " ' , $ supportedTypes ),
@@ -58,6 +58,6 @@ public static function createInvalidObjectType(string $path, string $type, array
5858
5959 public static function createTypeIsNotAString (string $ path , string $ dataType ): self
6060 {
61- return new self (sprintf ('Type is not a string, "%s" given at path: "%s" ' , $ dataType , $ path ));
61+ return new self (\ sprintf ('Type is not a string, "%s" given at path: "%s" ' , $ dataType , $ path ));
6262 }
6363}
0 commit comments