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
thrownew \RuntimeException(sprintf('The resource named `%s` is not a component', $resource));
770
+
thrownew \RuntimeException(\sprintf('The resource named `%s` is not a component', $resource));
771
771
}
772
772
773
773
$page = $this->thereIsAPage('page_1');
@@ -870,7 +870,7 @@ public function theResourceShouldNotExist(string $name): void
870
870
try {
871
871
$iri = $this->restContext->resources[$name];
872
872
$this->iriConverter->getResourceFromIri($iri);
873
-
thrownewExpectationException(sprintf('The resource %s can still be found and has not been removed', $iri), $this->minkContext->getSession()->getDriver());
873
+
thrownewExpectationException(\sprintf('The resource %s can still be found and has not been removed', $iri), $this->minkContext->getSession()->getDriver());
874
874
} catch (ItemNotFoundException$exception) {
875
875
}
876
876
}
@@ -886,7 +886,7 @@ public function theRefreshTokenShouldBeExpired(): void
thrownewExpectationException(sprintf('The token with ID %s is not expired', $this->restContext->resources['refresh_token']), $this->minkContext->getSession()->getDriver());
889
+
thrownewExpectationException(\sprintf('The token with ID %s is not expired', $this->restContext->resources['refresh_token']), $this->minkContext->getSession()->getDriver());
890
890
}
891
891
}
892
892
@@ -902,7 +902,7 @@ public function allTheRefreshTokensShouldBeExpired(): void
902
902
]);
903
903
foreach ($tokensas$token) {
904
904
if (!$token->isExpired()) {
905
-
thrownewExpectationException(sprintf('The token with ID %s is not expired', $this->restContext->resources['refresh_token']), $this->minkContext->getSession()->getDriver());
905
+
thrownewExpectationException(\sprintf('The token with ID %s is not expired', $this->restContext->resources['refresh_token']), $this->minkContext->getSession()->getDriver());
906
906
}
907
907
}
908
908
}
@@ -917,7 +917,7 @@ public function theResourceShouldExist(string $name): void
917
917
$iri = $this->restContext->resources[$name];
918
918
$this->iriConverter->getResourceFromIri($iri);
919
919
} catch (ItemNotFoundException$exception) {
920
-
thrownewExpectationException(sprintf('The resource %s cannot be found anymore', $iri), $this->minkContext->getSession()->getDriver());
920
+
thrownewExpectationException(\sprintf('The resource %s cannot be found anymore', $iri), $this->minkContext->getSession()->getDriver());
921
921
}
922
922
}
923
923
@@ -1014,6 +1014,6 @@ public function aRefreshTokenShouldHaveBeenGenerated(int $count): void
1014
1014
++$nonExpiredCount;
1015
1015
}
1016
1016
}
1017
-
Assert::assertLessThanOrEqual(1, $nonExpiredCount, sprintf('There should only be 1 token that is not expired. There are %d', $nonExpiredCount));
1017
+
Assert::assertLessThanOrEqual(1, $nonExpiredCount, \sprintf('There should only be 1 token that is not expired. There are %d', $nonExpiredCount));
if (null !== $count && \count($messageObjects) !== $count) {
91
-
thrownewExpectationException(sprintf('%d updates were published but %d were expected', \count($messageObjects), $count), $this->minkContext->getSession()->getDriver());
91
+
thrownewExpectationException(\sprintf('%d updates were published but %d were expected', \count($messageObjects), $count), $this->minkContext->getSession()->getDriver());
92
92
}
93
93
94
94
return$messageObjects;
@@ -117,7 +117,7 @@ private function getMercureComponentGroupMessage()
117
117
return$messageAsArray;
118
118
}
119
119
}
120
-
thrownewExpectationException(sprintf('%d updates were published but no ComponentGroup was found', \count($messageObjects)), $this->minkContext->getSession()->getDriver());
120
+
thrownewExpectationException(\sprintf('%d updates were published but no ComponentGroup was found', \count($messageObjects)), $this->minkContext->getSession()->getDriver());
121
121
}
122
122
123
123
/**
@@ -156,7 +156,7 @@ public function thereShouldMercureMessagesForDraftResources(int $count)
156
156
}
157
157
}
158
158
if ($draftCount !== $count) {
159
-
thrownewExpectationException(sprintf('%d draft updates were published but %d were expected', $draftCount, $count), $this->minkContext->getSession()->getDriver());
159
+
thrownewExpectationException(\sprintf('%d draft updates were published but %d were expected', $draftCount, $count), $this->minkContext->getSession()->getDriver());
160
160
}
161
161
}
162
162
@@ -184,7 +184,7 @@ public function theResourceShouldBePurgedFromTheCache(string $resourceName)
184
184
}
185
185
}
186
186
}
187
-
thrownewExpectationException(sprintf('The resource %s was not found in any xkey headers sent to be purged. IRIs that were purged were `%s`', $expectedIri, implode('`, `', $purged)), $this->minkContext->getSession()->getDriver());
187
+
thrownewExpectationException(\sprintf('The resource %s was not found in any xkey headers sent to be purged. IRIs that were purged were `%s`', $expectedIri, implode('`, `', $purged)), $this->minkContext->getSession()->getDriver());
188
188
}
189
189
190
190
/**
@@ -213,7 +213,7 @@ public function iShouldGetAnEmail(string $emailType, string $emailAddress = 'use
213
213
return$email->getSubject();
214
214
}, $messages);
215
215
216
-
Assert::assertCount(1, $messages, sprintf("%d messages were sent but only 1 was expected. Messages were sent with subjects '%s'", \count($messages), implode("', '", $subjects)));
216
+
Assert::assertCount(1, $messages, \sprintf("%d messages were sent but only 1 was expected. Messages were sent with subjects '%s'", \count($messages), implode("', '", $subjects)));
if ($expectedTotal !== ($receivedTotal = \count($items))) {
265
-
thrownewExpectationException(sprintf('Expected %d resources but received %d', $expectedTotal, $receivedTotal), $this->minkContext->getSession()->getDriver());
265
+
thrownewExpectationException(\sprintf('Expected %d resources but received %d', $expectedTotal, $receivedTotal), $this->minkContext->getSession()->getDriver());
@@ -293,7 +293,7 @@ static function (DummyPublishableComponent $component) {
293
293
294
294
$expectedTotal = \count($publishedResources);
295
295
296
-
Assert::assertEquals($expectedTotal, $receivedTotal = \count($items), sprintf('Expected %d resources but received %d', $expectedTotal, $receivedTotal));
296
+
Assert::assertEquals($expectedTotal, $receivedTotal = \count($items), \sprintf('Expected %d resources but received %d', $expectedTotal, $receivedTotal));
297
297
298
298
foreach ($itemsas$item) {
299
299
Assert::assertEquals('is_published', $item['reference'], 'Received an unexpected item in the response: ' . json_encode($item, \JSON_THROW_ON_ERROR, 512));
@@ -319,7 +319,7 @@ public function theResponseShouldIncludeThePublishedResourcesOnlyWithoutTheDraft
Assert::assertEquals($this->restContext->resources[$reference], $response['component'], sprintf('The component position was expected to have the component %s but %s was returned', $this->restContext->resources[$reference], $response['component']));
322
+
Assert::assertEquals($this->restContext->resources[$reference], $response['component'], \sprintf('The component position was expected to have the component %s but %s was returned', $this->restContext->resources[$reference], $response['component']));
323
323
}
324
324
325
325
/**
@@ -334,7 +334,7 @@ private function createPublishableComponent(?\DateTime $publishedAt, bool $force
thrownewExpectationException(sprintf("The resource with name $resource has not been defined. (Components that exist are `%s`)", implode('`, `', array_keys($this->resources))), $this->minkContext->getSession()->getDriver());
154
+
thrownewExpectationException(\sprintf("The resource with name $resource has not been defined. (Components that exist are `%s`)", implode('`, `', array_keys($this->resources))), $this->minkContext->getSession()->getDriver());
thrownewExpectationException(sprintf("The resource with name $resource has not been defined. (Components that exist are `%s`)", implode('`, `', array_keys($this->resources))), $this->minkContext->getSession()->getDriver());
166
+
thrownewExpectationException(\sprintf("The resource with name $resource has not been defined. (Components that exist are `%s`)", implode('`, `', array_keys($this->resources))), $this->minkContext->getSession()->getDriver());
Copy file name to clipboardExpand all lines: src/Action/Uploadable/UploadAction.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ public function __invoke(?object $data, Request $request, UploadableFileManager
42
42
$contentType = explode(';', $contentType)[0];
43
43
$formats = ['multipart/form-data'];
44
44
if (!\in_array(strtolower($contentType), $formats, true)) {
45
-
thrownewUnsupportedMediaTypeHttpException(sprintf('The content-type "%s" is not supported. Supported MIME type is "%s".', $contentType, implode('", "', $formats)));
45
+
thrownewUnsupportedMediaTypeHttpException(\sprintf('The content-type "%s" is not supported. Supported MIME type is "%s".', $contentType, implode('", "', $formats)));
0 commit comments