Browse Source

Fix "can not" spelling

Michael Voříšek 3 years ago
parent
commit
8ae89f4181

+ 1 - 1
src/Cache/Cache.php

@@ -78,7 +78,7 @@ final class Cache implements CacheInterface
 
         if (JSON_ERROR_NONE !== json_last_error()) {
             throw new \UnexpectedValueException(sprintf(
-                'Can not encode cache signature to JSON, error: "%s". If you have non-UTF8 chars in your signature, like in license for `header_comment`, consider enabling `ext-mbstring` or install `symfony/polyfill-mbstring`.',
+                'Cannot encode cache signature to JSON, error: "%s". If you have non-UTF8 chars in your signature, like in license for `header_comment`, consider enabling `ext-mbstring` or install `symfony/polyfill-mbstring`.',
                 json_last_error_msg()
             ));
         }

+ 1 - 1
src/Console/Command/DescribeCommand.php

@@ -256,7 +256,7 @@ final class DescribeCommand extends Command
 
         if (0 === \count($codeSamples)) {
             $output->writeln([
-                'Fixing examples can not be demonstrated on the current PHP version.',
+                'Fixing examples cannot be demonstrated on the current PHP version.',
                 '',
             ]);
         } else {

+ 1 - 1
src/FileReader.php

@@ -17,7 +17,7 @@ namespace PhpCsFixer;
 /**
  * File reader that unify access to regular file and stdin-alike file.
  *
- * Regular file could be read multiple times with `file_get_contents`, but file provided on stdin can not.
+ * Regular file could be read multiple times with `file_get_contents`, but file provided on stdin cannot.
  * Consecutive try will provide empty content for stdin-alike file.
  * This reader unifies access to them.
  *

+ 2 - 2
src/Fixer/Basic/PsrAutoloadingFixer.php

@@ -124,11 +124,11 @@ class InvalidName {}
             $tokens = Tokens::fromCode(sprintf('<?php class %s {}', $file->getBasename('.php')));
 
             if ($tokens[3]->isKeyword() || $tokens[3]->isMagicConstant()) {
-                // name can not be a class name - detected by PHP 5.x
+                // name cannot be a class name - detected by PHP 5.x
                 return false;
             }
         } catch (\ParseError $e) {
-            // name can not be a class name - detected by PHP 7.x
+            // name cannot be a class name - detected by PHP 7.x
             return false;
         }
 

+ 1 - 1
src/Tokenizer/Token.php

@@ -464,7 +464,7 @@ final class Token
         if (JSON_ERROR_NONE !== json_last_error()) {
             $jsonResult = json_encode(
                 [
-                    'errorDescription' => 'Can not encode Tokens to JSON.',
+                    'errorDescription' => 'Cannot encode Tokens to JSON.',
                     'rawErrorMessage' => json_last_error_msg(),
                 ],
                 JSON_PRETTY_PRINT | JSON_NUMERIC_CHECK

+ 1 - 1
tests/Cache/CacheTest.php

@@ -204,7 +204,7 @@ final class CacheTest extends TestCase
         );
 
         $this->expectExceptionMessage(
-            'Can not encode cache signature to JSON, error: "Malformed UTF-8 characters, possibly incorrectly encoded". If you have non-UTF8 chars in your signature, like in license for `header_comment`, consider enabling `ext-mbstring` or install `symfony/polyfill-mbstring`.'
+            'Cannot encode cache signature to JSON, error: "Malformed UTF-8 characters, possibly incorrectly encoded". If you have non-UTF8 chars in your signature, like in license for `header_comment`, consider enabling `ext-mbstring` or install `symfony/polyfill-mbstring`.'
         );
 
         $cache->toJson();