You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewLogicException(sprintf('The "%s" class cannot be used as it needs "%s". Try running "composer require egulias/email-validator".', __CLASS__, EmailValidator::class));
45
+
thrownewLogicException(\sprintf('The "%s" class cannot be used as it needs "%s". Try running "composer require egulias/email-validator".', __CLASS__, EmailValidator::class));
46
46
}
47
47
48
48
self::$validator ??= newEmailValidator();
@@ -51,7 +51,7 @@ public function __construct(string $address, string $name = '')
thrownewLogicException(sprintf('Impossible to set header "%s" as it\'s already defined and must be unique.', $header->getName()));
173
+
thrownewLogicException(\sprintf('Impossible to set header "%s" as it\'s already defined and must be unique.', $header->getName()));
174
174
}
175
175
176
176
$this->headers[$name][] = $header;
@@ -241,7 +241,7 @@ public static function checkHeaderClass(HeaderInterface $header): void
241
241
}
242
242
}
243
243
244
-
thrownewLogicException(sprintf('The "%s" header must be an instance of "%s" (got "%s").', $header->getName(), implode('" or "', $headerClasses), get_debug_type($header)));
244
+
thrownewLogicException(\sprintf('The "%s" header must be an instance of "%s" (got "%s").', $header->getName(), implode('" or "', $headerClasses), get_debug_type($header)));
245
245
}
246
246
247
247
publicfunctiontoString(): string
@@ -291,7 +291,7 @@ public function getHeaderParameter(string $name, string $parameter): ?string
291
291
292
292
$header = $this->get($name);
293
293
if (!$headerinstanceof ParameterizedHeader) {
294
-
thrownewLogicException(sprintf('Unable to get parameter "%s" on header "%s" as the header is not of class "%s".', $parameter, $name, ParameterizedHeader::class));
294
+
thrownewLogicException(\sprintf('Unable to get parameter "%s" on header "%s" as the header is not of class "%s".', $parameter, $name, ParameterizedHeader::class));
295
295
}
296
296
297
297
return$header->getParameter($parameter);
@@ -303,12 +303,12 @@ public function getHeaderParameter(string $name, string $parameter): ?string
thrownewLogicException(sprintf('Unable to set parameter "%s" on header "%s" as the header is not defined.', $parameter, $name));
306
+
thrownewLogicException(\sprintf('Unable to set parameter "%s" on header "%s" as the header is not defined.', $parameter, $name));
307
307
}
308
308
309
309
$header = $this->get($name);
310
310
if (!$headerinstanceof ParameterizedHeader) {
311
-
thrownewLogicException(sprintf('Unable to set parameter "%s" on header "%s" as the header is not of class "%s".', $parameter, $name, ParameterizedHeader::class));
311
+
thrownewLogicException(\sprintf('Unable to set parameter "%s" on header "%s" as the header is not of class "%s".', $parameter, $name, ParameterizedHeader::class));
Copy file name to clipboardexpand all lines: Part/Multipart/FormDataPart.php
+3-3
Original file line number
Diff line number
Diff line change
@@ -52,14 +52,14 @@ private function prepareFields(array $fields): array
52
52
$prepare = function ($item, $key, $root = null) use (&$values, &$prepare) {
53
53
if (null === $root && \is_int($key) && \is_array($item)) {
54
54
if (1 !== \count($item)) {
55
-
thrownewInvalidArgumentException(sprintf('Form field values with integer keys can only have one array element, the key being the field name and the value being the field value, %d provided.', \count($item)));
55
+
thrownewInvalidArgumentException(\sprintf('Form field values with integer keys can only have one array element, the key being the field name and the value being the field value, %d provided.', \count($item)));
@@ -68,7 +68,7 @@ private function prepareFields(array $fields): array
68
68
}
69
69
70
70
if (!\is_string($item) && !$iteminstanceof TextPart) {
71
-
thrownewInvalidArgumentException(sprintf('The value of the form field "%s" can only be a string, an array, or an instance of TextPart, "%s" given.', $fieldName, get_debug_type($item)));
71
+
thrownewInvalidArgumentException(\sprintf('The value of the form field "%s" can only be a string, an array, or an instance of TextPart, "%s" given.', $fieldName, get_debug_type($item)));
0 commit comments