Skip to content

Commit 2e124b2

Browse files
minor #43299 Fix "can not" spelling (mvorisek)
This PR was squashed before being merged into the 5.4 branch. Discussion ---------- Fix "can not" spelling | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- 28a438eed4 Fix "can not" spelling
2 parents 5aa6e8f + 2e213a0 commit 2e124b2

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

Command/AssetsInstallCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ private function absoluteSymlinkWithFallback(string $originDir, string $targetDi
233233
/**
234234
* Creates symbolic link.
235235
*
236-
* @throws IOException if link can not be created
236+
* @throws IOException if link cannot be created
237237
*/
238238
private function symlink(string $originDir, string $targetDir, bool $relative = false)
239239
{

Command/ContainerDebugCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,9 @@ protected function validateInput(InputInterface $input)
208208

209209
$name = $input->getArgument('name');
210210
if ((null !== $name) && ($optionsCount > 0)) {
211-
throw new InvalidArgumentException('The options tags, tag, parameters & parameter can not be combined with the service name argument.');
211+
throw new InvalidArgumentException('The options tags, tag, parameters & parameter cannot be combined with the service name argument.');
212212
} elseif ((null === $name) && $optionsCount > 1) {
213-
throw new InvalidArgumentException('The options tags, tag, parameters & parameter can not be combined together.');
213+
throw new InvalidArgumentException('The options tags, tag, parameters & parameter cannot be combined together.');
214214
}
215215
}
216216

Controller/AbstractController.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ protected function addFlash(string $type, $message): void
211211
try {
212212
$this->container->get('request_stack')->getSession()->getFlashBag()->add($type, $message);
213213
} catch (SessionNotFoundException $e) {
214-
throw new \LogicException('You can not use the addFlash method if sessions are disabled. Enable them in "config/packages/framework.yaml".', 0, $e);
214+
throw new \LogicException('You cannot use the addFlash method if sessions are disabled. Enable them in "config/packages/framework.yaml".', 0, $e);
215215
}
216216
}
217217

@@ -252,7 +252,7 @@ protected function denyAccessUnlessGranted($attribute, $subject = null, string $
252252
protected function renderView(string $view, array $parameters = []): string
253253
{
254254
if (!$this->container->has('twig')) {
255-
throw new \LogicException('You can not use the "renderView" method if the Twig Bundle is not available. Try running "composer require symfony/twig-bundle".');
255+
throw new \LogicException('You cannot use the "renderView" method if the Twig Bundle is not available. Try running "composer require symfony/twig-bundle".');
256256
}
257257

258258
return $this->container->get('twig')->render($view, $parameters);
@@ -310,7 +310,7 @@ protected function renderForm(string $view, array $parameters = [], Response $re
310310
protected function stream(string $view, array $parameters = [], StreamedResponse $response = null): StreamedResponse
311311
{
312312
if (!$this->container->has('twig')) {
313-
throw new \LogicException('You can not use the "stream" method if the Twig Bundle is not available. Try running "composer require symfony/twig-bundle".');
313+
throw new \LogicException('You cannot use the "stream" method if the Twig Bundle is not available. Try running "composer require symfony/twig-bundle".');
314314
}
315315

316316
$twig = $this->container->get('twig');
@@ -352,7 +352,7 @@ protected function createNotFoundException(string $message = 'Not Found', \Throw
352352
protected function createAccessDeniedException(string $message = 'Access Denied.', \Throwable $previous = null): AccessDeniedException
353353
{
354354
if (!class_exists(AccessDeniedException::class)) {
355-
throw new \LogicException('You can not use the "createAccessDeniedException" method if the Security component is not available. Try running "composer require symfony/security-bundle".');
355+
throw new \LogicException('You cannot use the "createAccessDeniedException" method if the Security component is not available. Try running "composer require symfony/security-bundle".');
356356
}
357357

358358
return new AccessDeniedException($message, $previous);
@@ -462,7 +462,7 @@ protected function dispatchMessage(object $message, array $stamps = []): Envelop
462462
protected function addLink(Request $request, LinkInterface $link): void
463463
{
464464
if (!class_exists(AddLinkHeaderListener::class)) {
465-
throw new \LogicException('You can not use the "addLink" method if the WebLink component is not available. Try running "composer require symfony/web-link".');
465+
throw new \LogicException('You cannot use the "addLink" method if the WebLink component is not available. Try running "composer require symfony/web-link".');
466466
}
467467

468468
if (null === $linkProvider = $request->attributes->get('_links')) {

Controller/TemplateController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function __construct(Environment $twig = null)
4242
public function templateAction(string $template, int $maxAge = null, int $sharedAge = null, bool $private = null, array $context = []): Response
4343
{
4444
if (null === $this->twig) {
45-
throw new \LogicException('You can not use the TemplateController if the Twig Bundle is not available.');
45+
throw new \LogicException('You cannot use the TemplateController if the Twig Bundle is not available.');
4646
}
4747

4848
$response = new Response($this->twig->render($template, $context));

Tests/Controller/TemplateControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function testTwig()
3535
public function testNoTwig()
3636
{
3737
$this->expectException(\LogicException::class);
38-
$this->expectExceptionMessage('You can not use the TemplateController if the Twig Bundle is not available.');
38+
$this->expectExceptionMessage('You cannot use the TemplateController if the Twig Bundle is not available.');
3939
$controller = new TemplateController();
4040

4141
$controller->templateAction('mytemplate')->getContent();

0 commit comments

Comments
 (0)