8000 minor #43299 Fix "can not" spelling (mvorisek) · symfony/symfony@02e6f4d · GitHub
[go: up one dir, main page]

Skip to content

Commit 02e6f4d

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 ------- 28a438e Fix "can not" spelling
2 parents 055b38f + 28a438e commit 02e6f4d

File tree

54 files changed

+77
-80
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+77
-80
lines changed

src/Symfony/Bridge/Twig/Tests/Translation/TwigExtractorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function getExtractData()
8282
['{{ ("another " ~ "new " ~ "key") | trans() }}', ['another new key' => 'messages']],
8383
['{{ ("new" ~ " key") | trans(domain="domain") }}', ['new key' => 'domain']],
8484
['{{ ("another " ~ "new " ~ "key") | trans(domain="domain") }}', ['another new key' => 'domain']],
85-
// if it has a variable or other expression, we can not extract it
85+
// if it has a variable or other expression, we cannot extract it
8686
['{% set foo = "new" %} {{ ("new " ~ foo ~ "key") | trans() }}', []],
8787
['{{ ("foo " ~ "new"|trans ~ "key") | trans() }}', ['new' => 'messages']],
8888
];

src/Symfony/Bundle/FrameworkBundle/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
{

src/Symfony/Bundle/FrameworkBundle/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 Inv 1241 alidArgumentException('The options tags, tag, parameters & parameter cannot be combined together.');
214214
}
215215
}
216216

src/Symfony/Bundle/FrameworkBundle/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')) {

src/Symfony/Bundle/FrameworkBundle/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));

src/Symfony/Bundle/FrameworkBundle/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();

src/Symfony/Component/Cache/Tests/Adapter/NullAdapterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff lin 10000 e change
@@ -66,7 +66,7 @@ public function testGetItems()
6666
$itemKey = $item->getKey();
6767

6868
$this->assertEquals($itemKey, $key, 'Keys must be preserved when fetching multiple items');
69-
$this->assertContains($key, $keys, 'Cache key can not change.');
69+
$this->assertContains($key, $keys, 'Cache key cannot change.');
7070
$this->assertFalse($item->isHit());
7171

7272
// Remove $key for $keys

src/Symfony/Component/Config/Definition/PrototypedArrayNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public function getPrototype()
159159
*/
160160
public function addChild(NodeInterface $node)
161161
{
162-
throw new Exception('A prototyped array node can not have concrete children.');
162+
throw new Exception('A prototyped array node cannot have concrete children.');
163163
}
164164

165165
/**

src/Symfony/Component/Console/Command/Command.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@ public static function getDefaultName()
7676
return $class === $r->class ? static::$defaultName : null;
7777
}
7878

79-
/**
80-
* @return string|null
81-
*/
8279
public static function getDefaultDescription(): ?string
8380
{
8481
$class = static::class;
@@ -173,7 +170,7 @@ public function getApplication()
173170
/**
174171
* Checks whether the command is enabled or not in the current environment.
175172
*
176-
* Override this to check for x or y and return false if the command can not
173+
* Override this to check for x or y and return false if the command cannot
177174
* run properly under the current conditions.
178175
*
179176
* @return bool

src/Symfony/Component/Console/Question/Question.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function setHidden(bool $hidden)
111111
}
112112

113113
/**
114-
* In case the response can not be hidden, whether to fallback on non-hidden question or not.
114+
* In case the response cannot be hidden, whether to fallback on non-hidden question or not.
115115
*
116116
* @return bool
117117
*/
@@ -121,7 +121,7 @@ public function isHiddenFallback()
121121
}
122122

123123
/**
124-
* Sets whether to fallback on non-hidden question if the response can not be hidden.
124+
* Sets whether to fallback on non-hidden question if the response cannot be hidden.
125125
*
126126
* @return $this
127127
*/

0 commit comments

Comments
 (0)
0