diff --git a/CHANGELOG.md b/CHANGELOG.md index 9661afef3d..1c42cb77de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ Features: Improvements: - Do not use indexer when renaming private properties/methods #2672 @dantleech - - Fix contextual completion in constructor agrument position #2504 + - Fix contextual completion in constructor argument position #2504 - Basic support for `array_reduce` stub #2576 - Support variadics in contextual completion #2603 - Allow use of `%project_root%` in index paths #2665 @mamazon @@ -54,9 +54,9 @@ Improvements: - Include project PHP and runtime version and LSP status - Add `iterable` "generic" `@param` in docblock #2585 - Improved diagnostic engine #2584 - - Ongoing windows compatiblity effort #2567 #2572 #2570 @MatmaRex + - Ongoing windows compatibility effort #2567 #2572 #2570 @MatmaRex - Ignore unnecessary files in gitexport #2570 @zonuexe - - Improve ANSI test compatiblity #2521 @gerardroche + - Improve ANSI test compatibility #2521 @gerardroche - More snippet support #2515 #2508 @przepompownia - Add completion for `@throws` #2509 @przepompownia @@ -94,7 +94,7 @@ Bug fixes: - Fix enum cases() not existing false-positive #2423 - Fix incorrect enum import #2400 - Fix undefined var false positive for arra unpacking #2403 - - Fix autoloading class conflcits with test files #2535 @gerardroche + - Fix autoloading class conflicts with test files #2535 @gerardroche - Fix enum renaming in legacy renamer #2445 - Fix enum renaming on "new" renamer #2445 - Fix crash on resolveItem() caused by race condition (?) #2434 @@ -125,7 +125,7 @@ Bug fixes: - Fix `null` error (and improve type safety) in the docblock parser #2379 - Fix undefined-var false positive for undeclared variables that have `@var` #2366 - Fix undefined-var false positive for pass by ref (again) #2361 - - Do not crash lanugage server if LSP header cannot be parsed (log error + - Do not crash language server if LSP header cannot be parsed (log error instead) #2373 Improvements: @@ -223,7 +223,7 @@ Features: - Support for inlay hints #2138 - Deprecation diagnostics #2120 - Auto configuration - automatically suggest and apply configuration #2114 - - Transform to "promote" unassigned consturctor properties #2106 + - Transform to "promote" unassigned constructor properties #2106 - Hierarchical namespace segment completion #2070 - Completion for promoted property visiblity #2087 - Option `language_server.diagnostic_outsource` to outsource diagnostics in separate process #2105 @@ -268,7 +268,7 @@ Bug fixes: - Do not add NULL to type list (fixes search bug) #2009 - Create a real package for the tolerant-parser fork and use it #2033 - Also highlight use statements when hovering on class #2039 @mamazu - - Fix priotity of "internal" stub locator - facilitating enum completion #2040 + - Fix priority of "internal" stub locator - facilitating enum completion #2040 - Require posix extension #2042 @dacianb - Fix evaluation of replacement assignments #1705 - Fix crash on missing token in Indexer #2049 @vlada-dudr @@ -354,7 +354,7 @@ Documentation: Bug fixes: - - [lsp] Import all unresolved names command no longer dupliates names #1835 + - [lsp] Import all unresolved names command no longer duplicates names #1835 - [tp] Update tolerant parser library fixing issue with parsing `match` keyword #1873 - [rpc] Fix regression with :PhpactorClassNew opening in `Untitled` buffer #1881 - [ctf] Fix token issue with simple class-to-file converter #920 @@ -366,7 +366,7 @@ Improvements: - [wr] Better modelling of enums - [wr] Add additional phpactor-specific stubs (e.g. for Enums) - [lsp] Enum hover improvement - - [lsp] Improve formating signature help parameters #1894 + - [lsp] Improve formatting signature help parameters #1894 - [lsp] Highlighting more 10x faster #1891 - [cmp/lsp] inline type information for completion items - [cmp] complete `__construct` on `parent::` #1272 @@ -387,9 +387,9 @@ Bug fixes: - [in] Fix exception when indexed file has no path #1643 - [wr] Do not complete constants on class instance #1614 - [wr] Include virtual properties in class members #1623 - - [wr] Fix false positive for virutal method not existing #1603 + - [wr] Fix false positive for virtual method not existing #1603 - [wr] Ignore exceptions (permission denied f.e.) when traversing files #1569 - - [wr] Fix resolutin of virtual method + - [wr] Fix resolution of virtual method - [ct] Fix missing properties refactor does not import class #1534 - [ct] Fix false diagnostic for missing method #1500 - [dl] Fix docblock definition location at class level docblocks @@ -464,7 +464,7 @@ Features: - [ls] Lazily resolve documentation for completion items - [ct] Generate constructor refactoring - [ct] Fill object refactoring - - [ct] Remove unused imports diagnositcs and code transformation #1758 + - [ct] Remove unused imports diagnostic and code transformation #1758 - [wr] Added native WR single-pass diagnostics #1700 - [cmd] Index clean command #1691 @mamazu - [cmp] (re?)support completion on parent:: #1643 @@ -513,10 +513,10 @@ Features: - [language-server] Extract expression - @BladeMF - [language-server] Extract method generation - @BladeMF - [language-server] Initial support for method generation - @BladeMF - - [langauge-server] Support for renaming files (LSP 3.16) - @dantleech + - [language-server] Support for renaming files (LSP 3.16) - @dantleech - [language-server] Ability to use client file events where available - @dantleech - [completion] Experimental support snippets for built-in functions - @weeman1337 - - [completion] Experimental support snippets for class constructos - @weeman1337 + - [completion] Experimental support snippets for class constructs - @weeman1337 - [completion] Added `experimental` flag - [completion] Added flag to enable / disable snippets entirely - [language-server] Ensure workspace is indexed before finding references - @dantleech @@ -542,7 +542,7 @@ Bug fixes: - [worse-reflection] Fix variable detection in closures - @BladeMF - [completion] Fix snippet method completion #1172 - @BladeMF - [worse-reflection] Fix PHP8.0 deprecation warnings - @gregoire - - [completion] Tests fail due to jetbrain stubs changes - @weeman1337 + - [completion] Tests fail due to jetbrains stubs changes - @weeman1337 - [worse-reference-finder] Do not know how to create class from type "NULL" #1246 - @dantleech - [worse-reflection] Property context class not propagated @@ -566,7 +566,7 @@ Features: - [completion] Basic Doctrine annotation completion support - @elythyr - [completion] References are sorted alphabetically - @elythyr - [completion] Show warning character if method or class is deprecated - - [completion] Sort class names and fucntions according to proximity to current file by default - @dantleech + - [completion] Sort class names and functions according to proximity to current file by default - @dantleech - [composer] Class map only mode by default (do not register autoloader at all, do not include files) - [file-watcher] Experimental support for [watchman](https://facebook.github.io/watchman/) @@ -590,23 +590,23 @@ Improvements: - [language-server] Support document symbols (f.e. showing code outline for document) - [language-server] Support symbol highlighting - [language-server] Support for indexing constants - - [code-tranform] Generated accessors automatically `ucfirst` the property name when prefix is used. - @einenlum + - [code-transform] Generated accessors automatically `ucfirst` the property name when prefix is used. - @einenlum - [worse-reflection] Improved inference for property types - @elythyr - [worse-reflection] Include virtual members from traits - @scisssssssors - - [code-tranform] fix invalid missing property diagnostic (#1126) - @elythyr - - [code-transform] Improve performance for missing properries - @dantleech + - [code-transform] fix invalid missing property diagnostic (#1126) - @elythyr + - [code-transform] Improve performance for missing properties - @dantleech Bug fixes: - [code-transform] Catch unhandled exceptions - @dantleech - [text-document] valid php class names not detected for word-at-offset - - [code-tranform] Return types not considered for unresolved names - @dantleech + - [code-transform] Return types not considered for unresolved names - @dantleech - [completion] Avoid reflection on NULL - [scf] Fix support for moving and removing folders - @Lumnn - [indexer] Fix indexing of static properties - @BladeMF - [completion] Fix signature help in nested symbols - @BladeMF - [worse-reflection] Static properties not resolved - @BladeMF - - [lanaguge-server] Correctly highlight use statements against qualified + - [language-server] Correctly highlight use statements against qualified names - @dantleech - [language-server] Fix occasional class-not-found error on code transform (due to incorrectly formatted path) - [worse-reflection] Do not consider "iterable" as an FQN - @elythyr @@ -633,9 +633,9 @@ Features: - [language-server-completion] Automatically import class on completion confirm - @dantleech - [code-transform] Consider current class as a potential conflict for imports - @dantleech - [completion] Indexed class name and function completion - @dantleech - - [indexer-extension] Support "deep references" (search over all implementaions) - @dantleech - - [composer] Enable disbaling of autoloader inclusion via. `composer.enable` - @dantleech - - [lanaguage-server-completion] Auto-import functions - @dantleech + - [indexer-extension] Support "deep references" (search over all implementations) - @dantleech + - [composer] Enable disabling of autoloader inclusion via. `composer.enable` - @dantleech + - [language-server-completion] Auto-import functions - @dantleech Improvements: @@ -786,12 +786,12 @@ Features: - [vim-plugin] FZF multiple selection (#773). @elythyr - [vim-plugin] Maintain correct cursor position after certain text diffs (#770) - @elythyr - [code-transform|rpc] Generate multiple accessors for a class - @elythyr - - [code-tranform] Generate static methods if the call was static (#25) - @einenlum + - [code-transform] Generate static methods if the call was static (#25) - @einenlum - [completion] Use declared classes as completion source - [import-class] Import declared classes (as long as they can be statically resolved). - [rpc] Class import uses offset to determine type to import - - [class-mover] Possiblity to move related any files whose relations are + - [class-mover] Possibility to move related any files whose relations are defined in `navigator.destinations` (for both command and rpc) - [worse-reflection] Support virtual class properties (in addition to methods). @@ -816,7 +816,7 @@ BC Break: BC Break: - - [completion] Comletion API changed to accept the new + - [completion] Completion API changed to accept the new [TextDocument](https://github.com/phpactor/text-document). Features: @@ -1031,7 +1031,7 @@ Misc Features: - - [CodeTransform] Transformer to fix namesapce / class name #474 + - [CodeTransform] Transformer to fix namespace / class name #474 Improvements: @@ -1134,7 +1134,7 @@ Improvements: #380 - [RPC] Request validation (no more undefined index errors). - [WorseReflection] Classes inherit constants from interfaces. - - [CodeBuilder] Use statements added after the first lexigraphically + - [CodeBuilder] Use statements added after the first lexicographically inferior existing use-statement, fixes #176. Thanks @greg0ire. Bug fixes: diff --git a/autoload/phpactor.vim b/autoload/phpactor.vim index 602754992c..fe4ddc40e5 100644 --- a/autoload/phpactor.vim +++ b/autoload/phpactor.vim @@ -434,15 +434,15 @@ endfunction function! s:getEndOffsetFromMark(mark, linewise) let [line, column] = getpos(a:mark)[1:2] let offset = line2byte(line) - let lineLenght = strlen(getline(line)) + let lineLength = strlen(getline(line)) if v:true == a:linewise - return offset + lineLenght - 1 + return offset + lineLength - 1 endif " Note VIM returns 2,147,483,647 on this system when in block select mode if (column > 1000000) - let column = lineLenght + let column = lineLength endif return offset + column - 1 diff --git a/autoload/phpactor/input/list.vim b/autoload/phpactor/input/list.vim index 5bcfef8ee8..33e5d7aa4b 100644 --- a/autoload/phpactor/input/list.vim +++ b/autoload/phpactor/input/list.vim @@ -9,7 +9,7 @@ function! phpactor#input#list#inputlist(label, choices, multi, ResultHandler) call a:ResultHandler(a:choices[choice - 1]) endfunction -" expreimental: this stategy currently does not work when used in a +" expreimental: this strategy currently does not work when used in a " non-terminal RPC step - https://github.com/phpactor/phpactor/issues/845 function! phpactor#input#list#fzf(label, choices, multi, ResultHandler) let options = [ diff --git a/autoload/phpactor/quickfix.vim b/autoload/phpactor/quickfix.vim index 6ec7c2536b..7dd7058179 100644 --- a/autoload/phpactor/quickfix.vim +++ b/autoload/phpactor/quickfix.vim @@ -28,13 +28,13 @@ function! phpactor#quickfix#fzf(entries) abort call add(sortedKeys, key) endfor - let formatedEntries = s:align_pairs(sortedKeys, '^\(.\{-}:\d\+:\d\+:\)\s*\(.*\)\s*$', 100) + let formattedEntries = s:align_pairs(sortedKeys, '^\(.\{-}:\d\+:\d\+:\)\s*\(.*\)\s*$', 100) let tmp = copy(entries) let entries = {} let source = [] " Need a list to keep the order (dict does not guarantee it) for key in sortedKeys - let newKey = formatedEntries[key] + let newKey = formattedEntries[key] let entries[newKey] = tmp[key] call add(source, newKey) endfor diff --git a/doc/_ext/phpactor.py b/doc/_ext/phpactor.py index f08c629505..af56f31a7e 100644 --- a/doc/_ext/phpactor.py +++ b/doc/_ext/phpactor.py @@ -4,7 +4,7 @@ class GitHubRepoDirective(Directive): - """Directive for Github Repositories.""" + """Directive for GitHub Repositories.""" required_arguments = 1 optional_arguments = 0 final_argument_whitespace = False @@ -20,7 +20,7 @@ def run(self): github_icon = nodes.image(uri=directives.uri("/images/github.svg"),width="15px",height="15px") title += github_icon, - title += nodes.emphasis(strong=True,text=' Github:') + title += nodes.emphasis(strong=True,text=' GitHub:') title += nodes.inline(text=' ') title += repo_link, diff --git a/doc/adr/0003-generics.md b/doc/adr/0003-generics.md index 7eef8621af..b13f40473a 100644 --- a/doc/adr/0003-generics.md +++ b/doc/adr/0003-generics.md @@ -64,7 +64,7 @@ $foobar = new Foobar($foo); // Foobar - Map parameters to template map `Map{T:"hello"}` - Resolve new generic type `Foobar<"hello">` - -## Param/Constructor injection with inheritence +## Param/Constructor injection with inheritance ```php /** @template T */ diff --git a/doc/dot/class-referenes.dot b/doc/dot/class-references.dot similarity index 100% rename from doc/dot/class-referenes.dot rename to doc/dot/class-references.dot diff --git a/doc/integrations/symfony.rst b/doc/integrations/symfony.rst index 03c5ed09fb..154a771073 100644 --- a/doc/integrations/symfony.rst +++ b/doc/integrations/symfony.rst @@ -27,8 +27,8 @@ for earlier versions. You can set the path to this file with :ref:`param_symfony.xml_path` -Troubeshooting --------------- +Troubleshooting +--------------- ### I don't get any completion suggestions or type inference. diff --git a/doc/lsp/code-actions.rst b/doc/lsp/code-actions.rst index 1fd5201070..86bd060136 100644 --- a/doc/lsp/code-actions.rst +++ b/doc/lsp/code-actions.rst @@ -14,7 +14,7 @@ List of currently available code actions: +---------------------------------------------+----------------------------------------+ | :ref:`refactoring_complete_constructor` | ``quickfix.complete_constructor`` | +---------------------------------------------+----------------------------------------+ -| :ref:`refactoring_add_missing_assignements` | ``quickfix.add_missing_properties`` | +| :ref:`refactoring_add_missing_assignments` | ``quickfix.add_missing_properties`` | +---------------------------------------------+----------------------------------------+ | :ref:`implement_contracts` | ``quickfix.implement_contracts`` | +---------------------------------------------+----------------------------------------+ diff --git a/doc/other/support.rst b/doc/other/support.rst index 5e5008d660..7c11af6a79 100644 --- a/doc/other/support.rst +++ b/doc/other/support.rst @@ -1,8 +1,8 @@ Support ======= -Need help? Create a Github issue or ping the Phpactor twitter account: +Need help? Create a GitHub issue or ping the Phpactor twitter account: -- `Github Issues `__ +- `GitHub Issues `__ - `Mastodon [@phpactor] `__ - `Twitter [@phpactor] `__ diff --git a/doc/reference/completion.rst b/doc/reference/completion.rst index 3f49982186..d73336ddc8 100644 --- a/doc/reference/completion.rst +++ b/doc/reference/completion.rst @@ -127,7 +127,7 @@ variable to that type, or a union of that type. See also Assignments ~~~~~~~~~~~ -Phpactor will track assignemnts: +Phpactor will track assignments: .. code:: php diff --git a/doc/reference/configuration.rst b/doc/reference/configuration.rst index 5f144a5c94..fdba4c41db 100644 --- a/doc/reference/configuration.rst +++ b/doc/reference/configuration.rst @@ -612,10 +612,10 @@ Enable or disable completion snippets **Default**: ``true`` -.. _param_completion_worse.experimantal: +.. _param_completion_worse.experimental: -``completion_worse.experimantal`` +``completion_worse.experimental`` """"""""""""""""""""""""""""""""" diff --git a/doc/reference/diagnostic.rst b/doc/reference/diagnostic.rst index 70f44cd312..b732632ad0 100644 --- a/doc/reference/diagnostic.rst +++ b/doc/reference/diagnostic.rst @@ -492,7 +492,7 @@ Report if a use statement is not required. - ``WARN``: ``Name "Foobar" is imported but not used`` - .. tab:: unused imort + .. tab:: unused import .. code-block:: php @@ -868,7 +868,7 @@ Report when a class extends a generic class but does not provide an @extends tag } /** - * @extends NeedGeneic + * @extends NotFoundGeneric */ class Foobar extends NeedGeneric { diff --git a/doc/reference/images/class-referenes.png b/doc/reference/images/class-references.png similarity index 100% rename from doc/reference/images/class-referenes.png rename to doc/reference/images/class-references.png diff --git a/doc/reference/navigation.rst b/doc/reference/navigation.rst index 6ebf0345ca..35996f3793 100644 --- a/doc/reference/navigation.rst +++ b/doc/reference/navigation.rst @@ -53,7 +53,7 @@ which you can navigate through (see ``:help quickfix``). The CLI command will list the references and show a highlighted line where the references were found. -.. figure:: images/class-referenes.png +.. figure:: images/class-references.png :alt: Class references Class references @@ -193,7 +193,7 @@ to the, for example, ``Locator`` type. Jump to Implementation ---------------------- -Jump to the implementatoin(s) of an interface or class +Jump to the implementation(s) of an interface or class .. tabs:: diff --git a/doc/reference/refactorings.rst b/doc/reference/refactorings.rst index 59c15fdcd7..386707e602 100644 --- a/doc/reference/refactorings.rst +++ b/doc/reference/refactorings.rst @@ -11,7 +11,7 @@ Refactoring Fixes ===== -.. _refactoring_add_missing_assignements: +.. _refactoring_add_missing_assignments: Add Missing Assignments ----------------------- @@ -829,7 +829,7 @@ After choosing the "Fill Object" code action: Override Method --------------- -Overide a method from a parent class. +Override a method from a parent class. .. tabs:: diff --git a/doc/reference/types.rst b/doc/reference/types.rst index efeb0918ac..83c9b5c40b 100644 --- a/doc/reference/types.rst +++ b/doc/reference/types.rst @@ -34,7 +34,7 @@ Basic Types Parent ``parent`` ``*`` ✔ Callable ``callable`` ``*`` ✔ Iterable ``iterable`` ``7.1`` ✔ - Nullable ``?Foor`` ``7.1`` ✔ + Nullable ``?Foo`` ``7.1`` ✔ Object ``object`` ``7.2`` ✔ Union ``Foo|Bar`` ``8.0`` ✔ Mixed ``mixed`` ``8.0`` ✔ @@ -95,7 +95,7 @@ Integer Types ============== ============= ========= =========== ``123`` ``*`` ✔ Integer ``0b0110`` ``*`` ✔ Binary type - ``0x1a`` ``*`` ✔ Hexidecimal + ``0x1a`` ``*`` ✔ Hexadecimal ``0123`` ``*`` ✔ Octal ``123_123`` ``7.4`` ✔ Decimal ``0o123`` ``8.1`` ✘ Octal diff --git a/doc/usage/standalone.rst b/doc/usage/standalone.rst index c00ce79510..06ad001fc9 100644 --- a/doc/usage/standalone.rst +++ b/doc/usage/standalone.rst @@ -56,7 +56,7 @@ Also available in the AUR: Nix/OS ------ -Phpactor is avialable in NixOS. +Phpactor is available in NixOS. .. code-block:: bash diff --git a/doc/vim-plugin/experimental.rst b/doc/vim-plugin/experimental.rst index 85036f3522..924fae72b4 100644 --- a/doc/vim-plugin/experimental.rst +++ b/doc/vim-plugin/experimental.rst @@ -16,11 +16,11 @@ In addition FZF support requires the FZF VIM plugin: FZF Choice Selection ~~~~~~~~~~~~~~~~~~~~ -Some refactorings will allow you to select multiple entires (for example +Some refactorings will allow you to select multiple entries (for example `override method `__. -FZF provides a fuzzy search interface and the possiblity to select +FZF provides a fuzzy search interface and the possibility to select multiple entries at once. Use ```` to toggle selection and CTRL-A/CTRL-D to select all/select diff --git a/lib/ClassMover/Tests/Adapter/TolerantParser/examples/Example1.php b/lib/ClassMover/Tests/Adapter/TolerantParser/examples/Example1.php index ad77452c96..779ae5bffa 100644 --- a/lib/ClassMover/Tests/Adapter/TolerantParser/examples/Example1.php +++ b/lib/ClassMover/Tests/Adapter/TolerantParser/examples/Example1.php @@ -13,7 +13,7 @@ public function something(): void $foo = new Warble(); $bar = new Demo(); - //this should not be found as it is de-referenced (we wil replace the use statement instead) + //this should not be found as it is de-referenced (we will replace the use statement instead) ZedZed::something(); assert(Barfoo::class === 'Foo'); diff --git a/lib/ClassMover/Tests/Unit/ClassMoverTest.php b/lib/ClassMover/Tests/Unit/ClassMoverTest.php index dfc2871e1c..e791123a05 100644 --- a/lib/ClassMover/Tests/Unit/ClassMoverTest.php +++ b/lib/ClassMover/Tests/Unit/ClassMoverTest.php @@ -41,7 +41,7 @@ public function setUp(): void } /** - * It should delgate to the finder to find references. + * It should delegate to the finder to find references. */ public function testFindReferences(): FoundReferences { diff --git a/lib/CodeBuilder/Adapter/TolerantParser/Updater/UseStatementUpdater.php b/lib/CodeBuilder/Adapter/TolerantParser/Updater/UseStatementUpdater.php index 9cdb7fdb6c..e7fb8601a3 100644 --- a/lib/CodeBuilder/Adapter/TolerantParser/Updater/UseStatementUpdater.php +++ b/lib/CodeBuilder/Adapter/TolerantParser/Updater/UseStatementUpdater.php @@ -100,7 +100,7 @@ public function updateUseStatements(Edits $edits, SourceCode $prototype, SourceF // Either add after the NamespaceUseDeclaration node if there // already was use imports or after the namespace/php declaration // Since it will add before the lasts new line of the node we - // preprend with another one so that the use statement is on its + // prepend with another one so that the use statement is on its // own line $newUseStatement = "\n" . $editText; $edits->after($startNode, $newUseStatement); diff --git a/lib/CodeBuilder/Domain/TemplatePathResolver/FilterPhpVersionDirectoryIterator.php b/lib/CodeBuilder/Domain/TemplatePathResolver/FilterPhpVersionDirectoryIterator.php index 2620a42068..c402789133 100644 --- a/lib/CodeBuilder/Domain/TemplatePathResolver/FilterPhpVersionDirectoryIterator.php +++ b/lib/CodeBuilder/Domain/TemplatePathResolver/FilterPhpVersionDirectoryIterator.php @@ -36,7 +36,7 @@ public function accept(): bool $filename = $file->getFilename(); - if (!$file->isDir() || // Keep only directy + if (!$file->isDir() || // Keep only directly !preg_match('/^\d+\.\d+/', $filename) || // Should have at leasts major and minor version !version_compare($filename, $this->phpVersion, '<=') // Should be at maximum equals to the defined version ) { diff --git a/lib/CodeBuilder/Tests/Adapter/UpdaterTestCase.php b/lib/CodeBuilder/Tests/Adapter/UpdaterTestCase.php index 265a3b197a..4c130346d2 100644 --- a/lib/CodeBuilder/Tests/Adapter/UpdaterTestCase.php +++ b/lib/CodeBuilder/Tests/Adapter/UpdaterTestCase.php @@ -363,7 +363,7 @@ trait Foobar EOT ]; - yield 'class import: previously included class with a lexigraphically greater member before it' => [ + yield 'class import: previously included class with a lexicographically greater member before it' => [ <<<'EOT' indentRemove($text)); + self::assertEquals($expected, (new TextFormat())->indentRemove($text)); } /** @@ -135,7 +135,7 @@ public function provideIndent(): Generator '' ]; - yield 'exmaple 1' => [ + yield 'example 1' => [ <<<'EOT' private $bar; EOT diff --git a/lib/CodeTransform/Adapter/TolerantParser/Refactor/TolerantExtractExpression.php b/lib/CodeTransform/Adapter/TolerantParser/Refactor/TolerantExtractExpression.php index 0c477d9feb..0eb632a92b 100644 --- a/lib/CodeTransform/Adapter/TolerantParser/Refactor/TolerantExtractExpression.php +++ b/lib/CodeTransform/Adapter/TolerantParser/Refactor/TolerantExtractExpression.php @@ -41,12 +41,12 @@ public function extractExpression(SourceCode $source, int $offsetStart, ?int $of $endPosition = $expression->getEndPosition(); $extractedString = rtrim(trim($source->extractSelection($startPosition, $endPosition)), ';'); - $assigment = sprintf('$%s = %s;', $variableName, $extractedString) . "\n"; + $assignment = sprintf('$%s = %s;', $variableName, $extractedString) . "\n"; $statement = $expression->getFirstAncestor(StatementNode::class); assert($statement instanceof StatementNode); - $edits = $this->resolveEdits($statement, $expression, $extractedString, $assigment, $variableName); + $edits = $this->resolveEdits($statement, $expression, $extractedString, $assignment, $variableName); return TextEdits::fromTextEdits($edits); } diff --git a/lib/CodeTransform/Adapter/WorseReflection/Transformer/CompleteConstructor.php b/lib/CodeTransform/Adapter/WorseReflection/Transformer/CompleteConstructor.php index bf2b66991c..4d146a6827 100644 --- a/lib/CodeTransform/Adapter/WorseReflection/Transformer/CompleteConstructor.php +++ b/lib/CodeTransform/Adapter/WorseReflection/Transformer/CompleteConstructor.php @@ -93,7 +93,7 @@ private function transformAssign(SourceCode $source): TextEdits $methodBody = (string) $constructMethod->body(); // Filtering out parameters from the parent class - $nonPromotedParameterNames = $this->getParentClassParamaterNames($class); + $nonPromotedParameterNames = $this->getParentClassParameterNames($class); $parametersToHandle = array_filter( iterator_to_array($constructMethod->parameters()->notPromoted()), fn (ReflectionParameter $parameter) => !in_array($parameter->name(), $nonPromotedParameterNames) @@ -136,7 +136,7 @@ private function transformPromote(SourceCode $source): TextEdits foreach ($this->candidateClasses($source) as $class) { $constructMethod = $class->methods()->get('__construct'); - $nonPromotedParameterNames = $this->getParentClassParamaterNames($class); + $nonPromotedParameterNames = $this->getParentClassParameterNames($class); foreach ($constructMethod->parameters()->notPromoted() as $parameter) { if (in_array($parameter->name(), $nonPromotedParameterNames)) { continue; @@ -152,7 +152,7 @@ private function transformPromote(SourceCode $source): TextEdits * Get the names of the parent constructor to know which parameters should not be promoted. * @return array */ - private function getParentClassParamaterNames(ReflectionClass $class): array + private function getParentClassParameterNames(ReflectionClass $class): array { $ancestor = $class->parent(); if ($ancestor === null) { diff --git a/lib/CodeTransform/Domain/Refactor/ExtractConstant.php b/lib/CodeTransform/Domain/Refactor/ExtractConstant.php index e16b2ed313..b28ba25064 100644 --- a/lib/CodeTransform/Domain/Refactor/ExtractConstant.php +++ b/lib/CodeTransform/Domain/Refactor/ExtractConstant.php @@ -7,7 +7,7 @@ interface ExtractConstant { - public function extractConstant(SourceCode $souceCode, int $offset, string $constantName): TextDocumentEdits; + public function extractConstant(SourceCode $sourceCode, int $offset, string $constantName): TextDocumentEdits; public function canExtractConstant(SourceCode $source, int $offset): bool; } diff --git a/lib/CodeTransform/Tests/Adapter/WorseReflection/Refactor/WorseExtractMethodTest.php b/lib/CodeTransform/Tests/Adapter/WorseReflection/Refactor/WorseExtractMethodTest.php index 909876479f..bc254a3833 100644 --- a/lib/CodeTransform/Tests/Adapter/WorseReflection/Refactor/WorseExtractMethodTest.php +++ b/lib/CodeTransform/Tests/Adapter/WorseReflection/Refactor/WorseExtractMethodTest.php @@ -50,7 +50,7 @@ public function provideExtractMethod(): Generator yield 'tail variables are taken from scope' => ['extractMethod11.test']; yield 'replacement indentation is preserved' => ['extractMethod12.test']; yield 'only considers selection content for return vars' => ['extractMethod13.test']; - yield 'return mutated primative' => ['extractMethod14.test']; + yield 'return mutated primitive' => ['extractMethod14.test']; yield 'imports classes' => ['extractMethod15.test']; yield 'adds return type for scalar' => ['extractMethod16.test']; yield 'adds return type for nullable scalar' => ['extractMethod16A.test']; diff --git a/lib/CodeTransform/Tests/Adapter/WorseReflection/Transformer/UpdateReturnTypeTransformerTest.php b/lib/CodeTransform/Tests/Adapter/WorseReflection/Transformer/UpdateReturnTypeTransformerTest.php index 99a22fcbc2..b14e073726 100644 --- a/lib/CodeTransform/Tests/Adapter/WorseReflection/Transformer/UpdateReturnTypeTransformerTest.php +++ b/lib/CodeTransform/Tests/Adapter/WorseReflection/Transformer/UpdateReturnTypeTransformerTest.php @@ -111,7 +111,7 @@ private function array(): ?array EOT ]; - yield 'add multipe return types' => [ + yield 'add multiple return types' => [ <<<'EOT' classTypeDesignator; + $typeName = $creationExpression->classTypeDesignator; if (!$typeName instanceof QualifiedName) { return null; diff --git a/lib/Completion/Tests/Benchmark/Code/Example1.php.test b/lib/Completion/Tests/Benchmark/Code/Example1.php.test index b0fbe80b5f..622ca4c346 100644 --- a/lib/Completion/Tests/Benchmark/Code/Example1.php.test +++ b/lib/Completion/Tests/Benchmark/Code/Example1.php.test @@ -52,7 +52,7 @@ class Example1 public function complete(string $source, int $offset): Response { - list($offset, $partialMatch) = $this->getOffetToReflect($source, $offset); + list($offset, $partialMatch) = $this->getOffsetToReflect($source, $offset); $reflectionOffset = $this->reflector->reflectOffset( SourceCode::fromString($source), @@ -72,7 +72,7 @@ class Example1 return new Response($suggestions, Issues::fromStrings($nodeContext->issues())); } - private function getOffetToReflect($source, $offset) + private function getOffsetToReflect($source, $offset) { /** @var string $source */ $source = str_replace("\n", ' ', $source); diff --git a/lib/ConfigLoader/Core/ConfigLoader.php b/lib/ConfigLoader/Core/ConfigLoader.php index 01a05c2ef1..0a583d63e9 100644 --- a/lib/ConfigLoader/Core/ConfigLoader.php +++ b/lib/ConfigLoader/Core/ConfigLoader.php @@ -27,7 +27,7 @@ public function load(): array if (null === $config) { throw new RuntimeException( - 'Error occured in array_replace_recursive' + 'Error occurred in array_replace_recursive' ); } } diff --git a/lib/Diff/StringSharedChars.php b/lib/Diff/StringSharedChars.php index 95cc16807c..f0313aa137 100644 --- a/lib/Diff/StringSharedChars.php +++ b/lib/Diff/StringSharedChars.php @@ -3,12 +3,12 @@ namespace Phpactor\Diff; /** - * An utility class to get details of shared begining and ending of a string + * An utility class to get details of shared beginning and ending of a string */ class StringSharedChars { /** - * Counts number of shared characters on the begining of a string + * Counts number of shared characters on the beginning of a string */ public static function startLength(string $a, string $b): int { diff --git a/lib/DocblockParser/Ast/Value/UnkownValue.php b/lib/DocblockParser/Ast/Value/UnknownValue.php similarity index 100% rename from lib/DocblockParser/Ast/Value/UnkownValue.php rename to lib/DocblockParser/Ast/Value/UnknownValue.php diff --git a/lib/Extension/ClassMover/Rpc/ReferencesHandler.php b/lib/Extension/ClassMover/Rpc/ReferencesHandler.php index 5362902103..3be304e88d 100644 --- a/lib/Extension/ClassMover/Rpc/ReferencesHandler.php +++ b/lib/Extension/ClassMover/Rpc/ReferencesHandler.php @@ -26,7 +26,7 @@ use RuntimeException; /** - * TODO: Extract the responsiblities of this class, see + * TODO: Extract the responsibilities of this class, see * https://github.com/phpactor/phpactor/issues/440 */ class ReferencesHandler extends AbstractHandler diff --git a/lib/Extension/CodeTransformExtra/Command/ClassTransformCommand.php b/lib/Extension/CodeTransformExtra/Command/ClassTransformCommand.php index df053fda99..1e0d61763a 100644 --- a/lib/Extension/CodeTransformExtra/Command/ClassTransformCommand.php +++ b/lib/Extension/CodeTransformExtra/Command/ClassTransformCommand.php @@ -29,7 +29,7 @@ public function configure(): void { $this->setDescription('Apply a transformation to an existing class (path or FQN)'); $this->addArgument('src', InputArgument::REQUIRED, 'Source path or FQN'); - $this->addOption('transform', 't', InputOption::VALUE_REQUIRED|InputOption::VALUE_IS_ARRAY, 'Tranformations to apply', []); + $this->addOption('transform', 't', InputOption::VALUE_REQUIRED|InputOption::VALUE_IS_ARRAY, 'Transformations to apply', []); $this->addOption('dry-run', null, InputOption::VALUE_NONE, 'Do not make any changes'); $this->addOption('diff', null, InputOption::VALUE_NONE, 'Output diff'); } diff --git a/lib/Extension/CompletionWorse/CompletionWorseExtension.php b/lib/Extension/CompletionWorse/CompletionWorseExtension.php index ca27d42edc..3759e852bc 100644 --- a/lib/Extension/CompletionWorse/CompletionWorseExtension.php +++ b/lib/Extension/CompletionWorse/CompletionWorseExtension.php @@ -74,7 +74,7 @@ class CompletionWorseExtension implements Extension public const SERVICE_COMPLETION_WORSE_SNIPPET_FORMATTERS = 'completion_worse.snippet.formatters'; public const NAME_SEARCH_STRATEGY_PROXIMITY = 'proximity'; public const NAME_SEARCH_STRATEGY_NONE = 'none'; - public const PARAM_EXPERIMENTAL = 'completion_worse.experimantal'; + public const PARAM_EXPERIMENTAL = 'completion_worse.experimental'; public const PARAM_SNIPPETS = 'completion_worse.snippets'; public const PARAM_DEBUG = 'completion_worse.debug'; diff --git a/lib/Extension/CompletionWorse/Tests/Unit/CompletionWorseExtensionTest.php b/lib/Extension/CompletionWorse/Tests/Unit/CompletionWorseExtensionTest.php index 3a125052e2..6d59d113aa 100644 --- a/lib/Extension/CompletionWorse/Tests/Unit/CompletionWorseExtensionTest.php +++ b/lib/Extension/CompletionWorse/Tests/Unit/CompletionWorseExtensionTest.php @@ -48,7 +48,7 @@ public function testDisableCompletors(): void self::assertFalse(in_array('completion_worse.completor.constructor', $completors), 'Completor disabled'); } - public function testExceptionWhenSelectingUnknownSearchPriotityStrategy(): void + public function testExceptionWhenSelectingUnknownSearchPriorityStrategy(): void { $this->expectException(RuntimeException::class); $this->expectExceptionMessage('Unknown search priority strategy "asd"'); diff --git a/lib/Extension/LanguageServer/LanguageServerExtension.php b/lib/Extension/LanguageServer/LanguageServerExtension.php index 7f3264ac76..dd48f4d68b 100644 --- a/lib/Extension/LanguageServer/LanguageServerExtension.php +++ b/lib/Extension/LanguageServer/LanguageServerExtension.php @@ -464,8 +464,8 @@ private function registerHandlers(ContainerBuilder $container): void $container->register(FormattingHandler::class, function (Container $container) { $formatter = null; - foreach ($container->getServiceIdsForTag(self::TAG_FORMATTER) as $seviceId => $_) { - $formatter = $container->get($seviceId); + foreach ($container->getServiceIdsForTag(self::TAG_FORMATTER) as $serviceId => $_) { + $formatter = $container->get($serviceId); if (null === $formatter) { continue; } diff --git a/lib/Extension/LanguageServerCodeTransform/Tests/Empty/sprintf.php b/lib/Extension/LanguageServerCodeTransform/Tests/Empty/sprintf.php index 4d58d5b27c..0b839cfc48 100644 --- a/lib/Extension/LanguageServerCodeTransform/Tests/Empty/sprintf.php +++ b/lib/Extension/LanguageServerCodeTransform/Tests/Empty/sprintf.php @@ -1,5 +1,5 @@ [ + yield 'code actions + diagnostic for non-existent class' => [ <<<'EOT' // File: subject.php [ + yield 'code actions + diagnostic for namespaced non-existent class' => [ <<<'EOT' // File: subject.php [ + yield 'built in global function' => [ <<<'EOT' // File: subject.php [ + yield 'property' => [ 'b; }', ]; diff --git a/lib/Extension/LanguageServerIndexer/Tests/Unit/Model/WorkspaceSymbolProviderTest.php b/lib/Extension/LanguageServerIndexer/Tests/Unit/Model/WorkspaceSymbolProviderTest.php index 66a17e88e3..585d35a5b0 100644 --- a/lib/Extension/LanguageServerIndexer/Tests/Unit/Model/WorkspaceSymbolProviderTest.php +++ b/lib/Extension/LanguageServerIndexer/Tests/Unit/Model/WorkspaceSymbolProviderTest.php @@ -40,8 +40,8 @@ public function testProvide(array $workspace, Closure $assertion, string $query, $locator = $container->get(TextDocumentLocator::class); $provider = new WorkspaceSymbolProvider($client, $locator, $limit); - $informations = wait($provider->provideFor($query)); - $assertion($informations); + $information = wait($provider->provideFor($query)); + $assertion($information); } /** diff --git a/lib/Extension/LanguageServerPhpCsFixer/Provider/PhpCsFixerDiagnosticsProvider.php b/lib/Extension/LanguageServerPhpCsFixer/Provider/PhpCsFixerDiagnosticsProvider.php index 3237d9cab3..5933734452 100644 --- a/lib/Extension/LanguageServerPhpCsFixer/Provider/PhpCsFixerDiagnosticsProvider.php +++ b/lib/Extension/LanguageServerPhpCsFixer/Provider/PhpCsFixerDiagnosticsProvider.php @@ -92,7 +92,7 @@ public function describe(): string } /** - * @return Promise False when there are no diagnostics available for file, array othwerwise + * @return Promise False when there are no diagnostics available for file, array otherwise * Array containing diagnostics to show */ private function findDiagnostics(TextDocumentItem $textDocument, CancellationToken $cancel): Promise @@ -184,7 +184,7 @@ private function explainRule(string $rule): Promise $description = preg_replace('/Fixing examples:.*/s', '', $description); if (!is_string($description)) { - throw new RuntimeException(sprintf('Description was epxected to be string, got %s', gettype($description))); + throw new RuntimeException(sprintf('Description was expected to be string, got %s', gettype($description))); } $description = trim($description); diff --git a/lib/Extension/LanguageServerReferenceFinder/Model/Highlighter.php b/lib/Extension/LanguageServerReferenceFinder/Model/Highlighter.php index 1d2be06e88..ee4afb667c 100644 --- a/lib/Extension/LanguageServerReferenceFinder/Model/Highlighter.php +++ b/lib/Extension/LanguageServerReferenceFinder/Model/Highlighter.php @@ -307,10 +307,10 @@ private function constants(SourceFileNode $rootNode, string $name): Generator /** * @return Generator */ - private function namespacedNames(Node $rootNode, string $fullyQualfiedName): Generator + private function namespacedNames(Node $rootNode, string $fullyQualifiedName): Generator { foreach ($rootNode->getDescendantNodes() as $node) { - if ($node instanceof NamespaceUseClause && (string) $node->namespaceName === $fullyQualfiedName) { + if ($node instanceof NamespaceUseClause && (string) $node->namespaceName === $fullyQualifiedName) { $nameParts = $node->namespaceName->nameParts; $name = end($nameParts); @@ -320,7 +320,7 @@ private function namespacedNames(Node $rootNode, string $fullyQualfiedName): Gen DocumentHighlightKind::TEXT ); } - if ($node instanceof ClassDeclaration && (string)$node->getNamespacedName() === $fullyQualfiedName) { + if ($node instanceof ClassDeclaration && (string)$node->getNamespacedName() === $fullyQualifiedName) { yield new Highlight( $node->name->getStartPosition(), $node->name->getEndPosition(), @@ -328,7 +328,7 @@ private function namespacedNames(Node $rootNode, string $fullyQualfiedName): Gen ); } if ($node instanceof QualifiedName) { - if ($fullyQualfiedName === (string)$node->getResolvedName()) { + if ($fullyQualifiedName === (string)$node->getResolvedName()) { yield new Highlight( $node->getStartPosition(), $node->getEndPosition(), diff --git a/lib/Extension/LanguageServerRename/LanguageServerRenameWorseExtension.php b/lib/Extension/LanguageServerRename/LanguageServerRenameWorseExtension.php index a7f92d2df0..19077c01e5 100644 --- a/lib/Extension/LanguageServerRename/LanguageServerRenameWorseExtension.php +++ b/lib/Extension/LanguageServerRename/LanguageServerRenameWorseExtension.php @@ -85,7 +85,7 @@ public function load(ContainerBuilder $container): void ]); $container->register(DefinitionAndReferenceFinder::class, function (Container $container) { - // wrap the definiton and reference finder to update the index with the current workspace + // wrap the definition and reference finder to update the index with the current workspace return new WorkspaceUpdateReferenceFinder( $container->get(LanguageServerExtension::SERVICE_SESSION_WORKSPACE), $container->get(Indexer::class), diff --git a/lib/Extension/LanguageServerWorseReflection/Workspace/WorkspaceIndex.php b/lib/Extension/LanguageServerWorseReflection/Workspace/WorkspaceIndex.php index ef67a3f054..69905c058d 100644 --- a/lib/Extension/LanguageServerWorseReflection/Workspace/WorkspaceIndex.php +++ b/lib/Extension/LanguageServerWorseReflection/Workspace/WorkspaceIndex.php @@ -56,7 +56,7 @@ public function index(TextDocument $textDocument): void * Refresh the document. * * In order to prevent continuous reparsing the document will - * only be refreshed at the sepecified interval. + * only be refreshed at the specified interval. */ private function updateDocument(TextDocument $textDocument): void { diff --git a/lib/Extension/ObjectRenderer/ObjectRendererBuilder.php b/lib/Extension/ObjectRenderer/ObjectRendererBuilder.php index 6c611db2c3..0e3c58668f 100644 --- a/lib/Extension/ObjectRenderer/ObjectRendererBuilder.php +++ b/lib/Extension/ObjectRenderer/ObjectRendererBuilder.php @@ -55,7 +55,7 @@ private function __construct() /** * Create a new instance of the builder. - * Call build() to create a new ObejctRenderer. + * Call build() to create a new ObjectRenderer. */ public static function create(): self { diff --git a/lib/Extension/Php/Tests/Unit/Model/ChainResolverTest.php b/lib/Extension/Php/Tests/Unit/Model/ChainResolverTest.php index 9760df2c6d..9529d014d9 100644 --- a/lib/Extension/Php/Tests/Unit/Model/ChainResolverTest.php +++ b/lib/Extension/Php/Tests/Unit/Model/ChainResolverTest.php @@ -9,7 +9,7 @@ class ChainResolverTest extends TestCase { - public function testThrowsExceptionIfNoVeresionCanBeResolved(): void + public function testThrowsExceptionIfNoVersionCanBeResolved(): void { $this->expectException(RuntimeException::class); (new ChainResolver())->resolve(); diff --git a/lib/Extension/PhpCodeSniffer/Provider/PhpCodeSnifferDiagnosticsProvider.php b/lib/Extension/PhpCodeSniffer/Provider/PhpCodeSnifferDiagnosticsProvider.php index bc24ff79f2..182da354a6 100644 --- a/lib/Extension/PhpCodeSniffer/Provider/PhpCodeSnifferDiagnosticsProvider.php +++ b/lib/Extension/PhpCodeSniffer/Provider/PhpCodeSnifferDiagnosticsProvider.php @@ -148,7 +148,7 @@ private function hasFixableDiagnostics(TextDocumentItem $textDocument): Promise } /** - * @return Promise False when there are no diagnostics available for file, array othwerwise + * @return Promise False when there are no diagnostics available for file, array otherwise * Array containing diagnostics to show */ private function findDiagnostics(TextDocumentItem $textDocument, CancellationToken $cancel): Promise diff --git a/lib/Extension/Rpc/Diff/TextEditBuilder.php b/lib/Extension/Rpc/Diff/TextEditBuilder.php index 6b35e95762..a29477a78b 100644 --- a/lib/Extension/Rpc/Diff/TextEditBuilder.php +++ b/lib/Extension/Rpc/Diff/TextEditBuilder.php @@ -10,7 +10,7 @@ * Text Edits are based on the LSP TextEdit object: * https://github.com/Microsoft/language-server-protocol/blob/gh-pages/specification.md#textedit * - * This is a weak implementation and uses a line-by-line diff alogrithm. All + * This is a weak implementation and uses a line-by-line diff algorithm. All * character offsets are 0. */ class TextEditBuilder diff --git a/lib/Extension/Rpc/Tests/Unit/Registry/ActiveHandlerRegistryTest.php b/lib/Extension/Rpc/Tests/Unit/Registry/ActiveHandlerRegistryTest.php index 38ce2721b4..972822fe52 100644 --- a/lib/Extension/Rpc/Tests/Unit/Registry/ActiveHandlerRegistryTest.php +++ b/lib/Extension/Rpc/Tests/Unit/Registry/ActiveHandlerRegistryTest.php @@ -10,7 +10,7 @@ class ActiveHandlerRegistryTest extends TestCase { - public function testExceptionForUnkown(): void + public function testExceptionForUnknown(): void { $this->expectException(HandlerNotFound::class); $this->expectExceptionMessage('No handler "aaa"'); diff --git a/lib/Extension/SourceCodeFilesystemExtra/Command/ClassSearchCommand.php b/lib/Extension/SourceCodeFilesystemExtra/Command/ClassSearchCommand.php index 2b6e44b8f3..83c241f180 100644 --- a/lib/Extension/SourceCodeFilesystemExtra/Command/ClassSearchCommand.php +++ b/lib/Extension/SourceCodeFilesystemExtra/Command/ClassSearchCommand.php @@ -23,7 +23,7 @@ public function __construct( public function configure(): void { - $this->setDescription('Search for class by (short) name and return informations on candidates'); + $this->setDescription('Search for class by (short) name and return information on candidates'); $this->addArgument('name', InputArgument::REQUIRED, 'Source path or FQN'); FormatHandler::configure($this); FilesystemHandler::configure($this, SourceCodeFilesystemExtension::FILESYSTEM_COMPOSER); diff --git a/lib/Extension/Symfony/WorseReflection/SymfonyContainerContextResolver.php b/lib/Extension/Symfony/WorseReflection/SymfonyContainerContextResolver.php index 069a45dfe9..e6b376e6b8 100644 --- a/lib/Extension/Symfony/WorseReflection/SymfonyContainerContextResolver.php +++ b/lib/Extension/Symfony/WorseReflection/SymfonyContainerContextResolver.php @@ -59,7 +59,7 @@ public function resolveMemberContext( } $type = $service->type; if ($type instanceof ClassType) { - $type = $type->asReflectedClasssType($reflector); + $type = $type->asReflectedClassType($reflector); } return $type; } diff --git a/lib/Extension/WorseReferenceFinder/WorseReferenceFinderExtension.php b/lib/Extension/WorseReferenceFinder/WorseReferenceFinderExtension.php index faae3dbfa2..551e5393b2 100644 --- a/lib/Extension/WorseReferenceFinder/WorseReferenceFinderExtension.php +++ b/lib/Extension/WorseReferenceFinder/WorseReferenceFinderExtension.php @@ -8,7 +8,7 @@ use Phpactor\Extension\ReferenceFinder\ReferenceFinderExtension; use Phpactor\Extension\WorseReflection\WorseReflectionExtension; use Phpactor\MapResolver\Resolver; -use Phpactor\WorseReferenceFinder\TolerantVariableDefintionLocator; +use Phpactor\WorseReferenceFinder\TolerantVariableDefinitionLocator; use Phpactor\WorseReferenceFinder\WorsePlainTextClassDefinitionLocator; use Phpactor\WorseReferenceFinder\WorseReflectionDefinitionLocator; use Phpactor\WorseReferenceFinder\WorseReflectionTypeLocator; @@ -38,7 +38,7 @@ public function load(ContainerBuilder $container): void }, [ ReferenceFinderExtension::TAG_DEFINITION_LOCATOR => []]); $container->register('worse_reference_finder.definition_locator.variable', function (Container $container) { - return new TolerantVariableDefintionLocator( + return new TolerantVariableDefinitionLocator( new TolerantVariableReferenceFinder( $container->get('worse_reflection.tolerant_parser'), true diff --git a/lib/Extension/WorseReflection/Command/DumpAstCommand.php b/lib/Extension/WorseReflection/Command/DumpAstCommand.php index 95d2baa295..cde18bfb8c 100644 --- a/lib/Extension/WorseReflection/Command/DumpAstCommand.php +++ b/lib/Extension/WorseReflection/Command/DumpAstCommand.php @@ -41,7 +41,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $rootNode = $this->parser->parseSourceFile($contents); $parseEnd = microtime(true); - $traveralStart = microtime(true); + $traversalStart = microtime(true); $out = ''; $this->dump($output, $rootNode, $out); $traversalEnd = microtime(true); @@ -49,7 +49,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $output->writeln($out); $output->writeln(''); $output->writeln(sprintf('Parsing time: %ss', number_format($parseEnd - $parseStart, 4))); - $output->writeln(sprintf('Traversal time: %ss', number_format($traversalEnd - $traveralStart, 4))); + $output->writeln(sprintf('Traversal time: %ss', number_format($traversalEnd - $traversalStart, 4))); return 0; } diff --git a/lib/FilePathResolver/Tests/Unit/Expander/CallbackExpanderTest.php b/lib/FilePathResolver/Tests/Unit/Expander/CallbackExpanderTest.php index 5859e3fa5f..d160437af3 100644 --- a/lib/FilePathResolver/Tests/Unit/Expander/CallbackExpanderTest.php +++ b/lib/FilePathResolver/Tests/Unit/Expander/CallbackExpanderTest.php @@ -20,7 +20,7 @@ public function testExpandsCallbackValue(): void $this->assertEquals('bar', $this->expand('%foo%')); } - public function testThrowsExeceptionWhenCallbackReturnsNonString(): void + public function testThrowsExceptionWhenCallbackReturnsNonString(): void { $this->expectException(RuntimeException::class); $this->expectExceptionMessage('Closure in callback expander'); diff --git a/lib/Indexer/Adapter/ReferenceFinder/IndexedReferenceFinder.php b/lib/Indexer/Adapter/ReferenceFinder/IndexedReferenceFinder.php index 68598807fa..78d1ffbeac 100644 --- a/lib/Indexer/Adapter/ReferenceFinder/IndexedReferenceFinder.php +++ b/lib/Indexer/Adapter/ReferenceFinder/IndexedReferenceFinder.php @@ -107,11 +107,11 @@ private function resolveReferences(NodeContext $nodeContext): Generator // note that we check the all implementations: this will multiply // the number of NOT and MAYBE matches - foreach ($this->implementationsOf($containerType) as $implemenations) { + foreach ($this->implementationsOf($containerType) as $implementations) { yield from $this->memberReferencesTo( $this->symbolTypeToReferenceType($nodeContext), $nodeContext->symbol()->name(), - $implemenations + $implementations ); } return; diff --git a/lib/Indexer/Extension/Command/IndexCleanCommand.php b/lib/Indexer/Extension/Command/IndexCleanCommand.php index 50179a9d4b..81a6a91ce0 100644 --- a/lib/Indexer/Extension/Command/IndexCleanCommand.php +++ b/lib/Indexer/Extension/Command/IndexCleanCommand.php @@ -44,7 +44,7 @@ protected function configure(): void Removing an index by the number in the list view: bin/console index:clean - Removing all indicies + Removing all indices bin/console index:clean %s === Interactive version === @@ -69,16 +69,16 @@ protected function execute(InputInterface $input, OutputInterface $output): int } $section = $output->section(); - $indicies = $this->getIndicies($section); + $indices = $this->getIndices($section); if (count($indexNames) !== 0) { if ($indexNames[0] === self::OPT_CLEAN_ALL) { - foreach ($indicies as $index) { + foreach ($indices as $index) { $this->removeIndex($output, $index); } return 0; } foreach ($indexNames as $indexName) { - $this->removeIndex($section, $indicies->get($indexName)); + $this->removeIndex($section, $indices->get($indexName)); } return 0; } @@ -86,14 +86,14 @@ protected function execute(InputInterface $input, OutputInterface $output): int $section->clear(); while (true) { - $this->renderIndexTable($indicies, $section); + $this->renderIndexTable($indices, $section); if ($index) { $section->writeln(sprintf('Removed index "%s"', $index->name())); } try { // pass $output instead of $section because the interactive input // is corrupted with he Section. - $index = $this->getInteractiveAnswer($indicies, $input, $output); + $index = $this->getInteractiveAnswer($indices, $input, $output); } catch (Exception $e) { $section->clear(); $section->writeln(sprintf('%s', $e->getMessage())); @@ -104,14 +104,14 @@ protected function execute(InputInterface $input, OutputInterface $output): int } if ($index->absolutePath() === self::OPT_CLEAN_ALL) { - foreach ($indicies as $index) { + foreach ($indices as $index) { $this->removeIndex($output, $index); } break; } $this->removeIndex($output, $index); - $indicies = $indicies->remove($index); + $indices = $indices->remove($index); $section->clear(); } @@ -162,7 +162,7 @@ private function getInteractiveAnswer(IndexInfos $infos, InputInterface $input, return $infos->get((string)$result); } - private function getIndicies(OutputInterface $output): IndexInfos + private function getIndices(OutputInterface $output): IndexInfos { $indexes = []; $progress = new ProgressBar($output); diff --git a/lib/Indexer/Model/IndexInfos.php b/lib/Indexer/Model/IndexInfos.php index b07e5bdded..ff59526a49 100644 --- a/lib/Indexer/Model/IndexInfos.php +++ b/lib/Indexer/Model/IndexInfos.php @@ -34,7 +34,7 @@ public function get(string $name): IndexInfo } throw new RuntimeException(sprintf( - 'Index "%s" not found. Available indicies are: %s', + 'Index "%s" not found. Available indices are: %s', $name, implode(', ', $this->names()) )); diff --git a/lib/Indexer/Tests/Adapter/ReferenceFinder/IndexedNameSearcherTest.php b/lib/Indexer/Tests/Adapter/ReferenceFinder/IndexedNameSearcherTest.php index ac5fc831f4..d5f83bcf0c 100644 --- a/lib/Indexer/Tests/Adapter/ReferenceFinder/IndexedNameSearcherTest.php +++ b/lib/Indexer/Tests/Adapter/ReferenceFinder/IndexedNameSearcherTest.php @@ -51,7 +51,7 @@ public function testSearcherForInterface(): void return; } - $this->fail('Could not find interace'); + $this->fail('Could not find interface'); } public function testSearcherForEnum(): void diff --git a/lib/Indexer/Tests/Adapter/Tolerant/Indexer/ClassLikeDeclarationIndexerTest.php b/lib/Indexer/Tests/Adapter/Tolerant/Indexer/ClassLikeDeclarationIndexerTest.php index c448602dbe..cad55daaf2 100644 --- a/lib/Indexer/Tests/Adapter/Tolerant/Indexer/ClassLikeDeclarationIndexerTest.php +++ b/lib/Indexer/Tests/Adapter/Tolerant/Indexer/ClassLikeDeclarationIndexerTest.php @@ -142,14 +142,14 @@ public function provideSearch(): Generator /** * @dataProvider provideInvalidClasses */ - public function testInvalidClass(string $manifest, string $exectedMessage): void + public function testInvalidClass(string $manifest, string $expectedMessage): void { $this->workspace()->reset(); $this->workspace()->loadManifest($manifest); $logger = $this->prophesize(LoggerInterface::class); - $logger->warning(Argument::containingString($exectedMessage))->shouldBeCalled(); + $logger->warning(Argument::containingString($expectedMessage))->shouldBeCalled(); $agent = $this->indexAgentBuilder('src') ->setIndexers([ diff --git a/lib/Indexer/Tests/Unit/Model/Query/Criteria/FqnBeginsWithTest.php b/lib/Indexer/Tests/Unit/Model/Query/Criteria/FqnBeginsWithTest.php index b7e5a4b805..26031065a7 100644 --- a/lib/Indexer/Tests/Unit/Model/Query/Criteria/FqnBeginsWithTest.php +++ b/lib/Indexer/Tests/Unit/Model/Query/Criteria/FqnBeginsWithTest.php @@ -26,7 +26,7 @@ public function testNotMatches(): void self::assertFalse(Criteria::fqnBeginsWith('Barfoo')->isSatisfiedBy($record)); } - public function testMatchesPartialBeginingWith(): void + public function testMatchesPartialBeginningWith(): void { $record = ClassRecord::fromName('Foobar\\Barfoos'); self::assertTrue(Criteria::fqnBeginsWith('Foo')->isSatisfiedBy($record)); diff --git a/lib/Indexer/Tests/Unit/Model/Query/Criteria/ShortNameBeginsWithTest.php b/lib/Indexer/Tests/Unit/Model/Query/Criteria/ShortNameBeginsWithTest.php index 239103a5ea..166bf0c982 100644 --- a/lib/Indexer/Tests/Unit/Model/Query/Criteria/ShortNameBeginsWithTest.php +++ b/lib/Indexer/Tests/Unit/Model/Query/Criteria/ShortNameBeginsWithTest.php @@ -27,7 +27,7 @@ public function testNotMatches(): void self::assertFalse((new ShortNameBeginsWith('Barfoo'))->isSatisfiedBy($record)); } - public function testMatchesPartialBeginingWith(): void + public function testMatchesPartialBeginningWith(): void { $record = ClassRecord::fromName('Foobar\\Barfoos'); self::assertTrue((new ShortNameBeginsWith('Barfoo'))->isSatisfiedBy($record)); diff --git a/lib/Name/FullyQualifiedName.php b/lib/Name/FullyQualifiedName.php index 6775680a20..5c12c64a9f 100644 --- a/lib/Name/FullyQualifiedName.php +++ b/lib/Name/FullyQualifiedName.php @@ -29,7 +29,7 @@ public static function fromQualifiedName(QualifiedName $qualfifiedName): self } /** - * Reutrn the last element of the name (e.g. the class's short name) + * Return the last element of the name (e.g. the class's short name) */ public function head(): QualifiedName { diff --git a/lib/Phpactor.php b/lib/Phpactor.php index 93544914c3..39a4eb5998 100644 --- a/lib/Phpactor.php +++ b/lib/Phpactor.php @@ -277,7 +277,7 @@ public static function boot(InputInterface $input, OutputInterface $output, stri } foreach ($masterSchema->errors()->errors() as $error) { - // do not polute STDERR for RPC, for some reason the VIM plugin reads also + // do not pollute STDERR for RPC, for some reason the VIM plugin reads also // STDERR and possibly other RPC clients too if ($commandName !== 'rpc') { if ($output instanceof ConsoleOutputInterface) { diff --git a/lib/Rename/Tests/Adapter/ReferenceFinder/VariableRenamerTest.php b/lib/Rename/Tests/Adapter/ReferenceFinder/VariableRenamerTest.php index ed43c89a81..be3a26d9ea 100644 --- a/lib/Rename/Tests/Adapter/ReferenceFinder/VariableRenamerTest.php +++ b/lib/Rename/Tests/Adapter/ReferenceFinder/VariableRenamerTest.php @@ -208,11 +208,11 @@ public function provideRename(): Generator * @param PotentialLocation[] $references * @param TextDocument[] $textDocuments */ - private function createRenamer(array $references, ?Location $defintionLocation, array $textDocuments): VariableRenamer + private function createRenamer(array $references, ?Location $definitionLocation, array $textDocuments): VariableRenamer { $variableRenamer = new VariableRenamer( new DefinitionAndReferenceFinder( - TestDefinitionLocator::fromSingleLocation(TypeFactory::unknown(), $defintionLocation), + TestDefinitionLocator::fromSingleLocation(TypeFactory::unknown(), $definitionLocation), new PredefinedReferenceFinder(...$references), ), InMemoryDocumentLocator::fromTextDocuments($textDocuments), diff --git a/lib/TextDocument/Tests/Unit/TextDocumentBuilderTest.php b/lib/TextDocument/Tests/Unit/TextDocumentBuilderTest.php index d7fd6f8f73..d689887089 100644 --- a/lib/TextDocument/Tests/Unit/TextDocumentBuilderTest.php +++ b/lib/TextDocument/Tests/Unit/TextDocumentBuilderTest.php @@ -45,6 +45,6 @@ public function testFromTextDocument(): void public function testExceptionOnNotExists(): void { $this->expectException(TextDocumentNotFound::class); - TextDocumentBuilder::fromUri('file:///no-existy'); + TextDocumentBuilder::fromUri('file:///no-exist'); } } diff --git a/lib/TextDocument/Tests/Unit/TextEditDiffTest.php b/lib/TextDocument/Tests/Unit/TextEditDiffTest.php index 8382d6147c..759acc4d81 100644 --- a/lib/TextDocument/Tests/Unit/TextEditDiffTest.php +++ b/lib/TextDocument/Tests/Unit/TextEditDiffTest.php @@ -43,7 +43,7 @@ public function provideDiff(): Generator 'b', ]; - yield 'differnet' => [ + yield 'different' => [ 'it little profits', 'that an idle king', ]; diff --git a/lib/TextDocument/TextEditDiff.php b/lib/TextDocument/TextEditDiff.php index 3cdf6f12c7..5f749aca72 100644 --- a/lib/TextDocument/TextEditDiff.php +++ b/lib/TextDocument/TextEditDiff.php @@ -118,7 +118,7 @@ private function textEdits(array $ops): TextEdits $chunks[] = $currentOps; } - // covert to text edits + // convert to text edits $edits = []; foreach ($chunks as $chunk) { if ($chunk[0][0] === self::ADD) { diff --git a/lib/WorseReferenceFinder/Tests/Unit/TolerantVariableDefintionLocatorTest.php b/lib/WorseReferenceFinder/Tests/Unit/TolerantVariableDefinitionLocatorTest.php similarity index 88% rename from lib/WorseReferenceFinder/Tests/Unit/TolerantVariableDefintionLocatorTest.php rename to lib/WorseReferenceFinder/Tests/Unit/TolerantVariableDefinitionLocatorTest.php index bd86082c72..48c7c24b9b 100644 --- a/lib/WorseReferenceFinder/Tests/Unit/TolerantVariableDefintionLocatorTest.php +++ b/lib/WorseReferenceFinder/Tests/Unit/TolerantVariableDefinitionLocatorTest.php @@ -5,10 +5,10 @@ use Microsoft\PhpParser\Parser; use Phpactor\ReferenceFinder\DefinitionLocator; use Phpactor\WorseReferenceFinder\Tests\DefinitionLocatorTestCase; -use Phpactor\WorseReferenceFinder\TolerantVariableDefintionLocator; +use Phpactor\WorseReferenceFinder\TolerantVariableDefinitionLocator; use Phpactor\WorseReferenceFinder\TolerantVariableReferenceFinder; -class TolerantVariableDefintionLocatorTest extends DefinitionLocatorTestCase +class TolerantVariableDefinitionLocatorTest extends DefinitionLocatorTestCase { public function testLocatesLocalVariable(): void { @@ -45,7 +45,7 @@ public function testGotoFirstIfVariableNotDefined(): void protected function locator(): DefinitionLocator { - return new TolerantVariableDefintionLocator( + return new TolerantVariableDefinitionLocator( new TolerantVariableReferenceFinder(new Parser(), true) ); } diff --git a/lib/WorseReferenceFinder/TolerantVariableDefintionLocator.php b/lib/WorseReferenceFinder/TolerantVariableDefinitionLocator.php similarity index 94% rename from lib/WorseReferenceFinder/TolerantVariableDefintionLocator.php rename to lib/WorseReferenceFinder/TolerantVariableDefinitionLocator.php index 521331d3db..aff591aa92 100644 --- a/lib/WorseReferenceFinder/TolerantVariableDefintionLocator.php +++ b/lib/WorseReferenceFinder/TolerantVariableDefinitionLocator.php @@ -12,7 +12,7 @@ use Phpactor\WorseReflection\Core\TypeFactory; use function assert; -class TolerantVariableDefintionLocator implements DefinitionLocator +class TolerantVariableDefinitionLocator implements DefinitionLocator { public function __construct(private TolerantVariableReferenceFinder $finder) { diff --git a/lib/WorseReflection/Bridge/TolerantParser/Diagnostics/DocblockMissingExtendsTagProvider.php b/lib/WorseReflection/Bridge/TolerantParser/Diagnostics/DocblockMissingExtendsTagProvider.php index 2056603700..d3f57f10a2 100644 --- a/lib/WorseReflection/Bridge/TolerantParser/Diagnostics/DocblockMissingExtendsTagProvider.php +++ b/lib/WorseReflection/Bridge/TolerantParser/Diagnostics/DocblockMissingExtendsTagProvider.php @@ -184,7 +184,7 @@ class NeedGeneric } /** - * @extends NeedGeneic + * @extends NotFoundGeneric */ class Foobar extends NeedGeneric { diff --git a/lib/WorseReflection/Bridge/TolerantParser/Diagnostics/DocblockMissingParamProvider.php b/lib/WorseReflection/Bridge/TolerantParser/Diagnostics/DocblockMissingParamProvider.php index 268551dc1d..aae4ded9a0 100644 --- a/lib/WorseReflection/Bridge/TolerantParser/Diagnostics/DocblockMissingParamProvider.php +++ b/lib/WorseReflection/Bridge/TolerantParser/Diagnostics/DocblockMissingParamProvider.php @@ -57,7 +57,7 @@ public function exit(NodeContextResolver $resolver, Frame $frame, Node $node): i return; } - // do not try it for overriden methods + // do not try it for overridden methods if ($method->original()->declaringClass()->name() != $class->name()) { return; } diff --git a/lib/WorseReflection/Bridge/TolerantParser/Diagnostics/DocblockMissingReturnTypeProvider.php b/lib/WorseReflection/Bridge/TolerantParser/Diagnostics/DocblockMissingReturnTypeProvider.php index 25dc672e55..64d9fcaf8e 100644 --- a/lib/WorseReflection/Bridge/TolerantParser/Diagnostics/DocblockMissingReturnTypeProvider.php +++ b/lib/WorseReflection/Bridge/TolerantParser/Diagnostics/DocblockMissingReturnTypeProvider.php @@ -59,7 +59,7 @@ public function exit(NodeContextResolver $resolver, Frame $frame, Node $node): i return; } - // do not try it for overriden methods + // do not try it for overridden methods if ($method->original()->declaringClass()->name() != $class->name()) { return; } diff --git a/lib/WorseReflection/Bridge/TolerantParser/Diagnostics/UnusedImportProvider.php b/lib/WorseReflection/Bridge/TolerantParser/Diagnostics/UnusedImportProvider.php index e1c2387eb5..d4ab5008a7 100644 --- a/lib/WorseReflection/Bridge/TolerantParser/Diagnostics/UnusedImportProvider.php +++ b/lib/WorseReflection/Bridge/TolerantParser/Diagnostics/UnusedImportProvider.php @@ -294,7 +294,7 @@ class Foobar { } ); yield new DiagnosticExample( - title: 'unused imort', + title: 'unused import', source: <<<'PHP' diff --git a/lib/WorseReflection/Bridge/TolerantParser/Reflection/ReflectionAttribute.php b/lib/WorseReflection/Bridge/TolerantParser/Reflection/ReflectionAttribute.php index 01f76df4ec..7e5b2bad30 100644 --- a/lib/WorseReflection/Bridge/TolerantParser/Reflection/ReflectionAttribute.php +++ b/lib/WorseReflection/Bridge/TolerantParser/Reflection/ReflectionAttribute.php @@ -41,7 +41,7 @@ public function class(): ReflectionClassLike $type = $this->locator->nodeContextResolver()->resolveNode($this->frame, $this->node->name)->type(); if (!$type instanceof ReflectedClassType) { - throw new CouldNotResolveNode(sprintf('Expceted "%s" but got "%s"', ReflectedClassType::class, get_class($type))); + throw new CouldNotResolveNode(sprintf('Expected "%s" but got "%s"', ReflectedClassType::class, get_class($type))); } $reflection = $type->reflectionOrNull(); diff --git a/lib/WorseReflection/Bridge/TolerantParser/Reflection/ReflectionClass.php b/lib/WorseReflection/Bridge/TolerantParser/Reflection/ReflectionClass.php index fde4ae772a..2ed10bb290 100644 --- a/lib/WorseReflection/Bridge/TolerantParser/Reflection/ReflectionClass.php +++ b/lib/WorseReflection/Bridge/TolerantParser/Reflection/ReflectionClass.php @@ -90,7 +90,7 @@ public function members(): ReflectionMemberCollection $reflectionClassLike )); - // only inerit public and protected properties from parent classes + // only inherit public and protected properties from parent classes if ($reflectionClassLike !== $this && !$reflectionClassLike instanceof ReflectionTrait) { $classLikeMembers = $classLikeMembers->byVisibilities([Visibility::public(), Visibility::protected()]); } diff --git a/lib/WorseReflection/Bridge/TolerantParser/Reflection/ReflectionEnum.php b/lib/WorseReflection/Bridge/TolerantParser/Reflection/ReflectionEnum.php index 4a4034d935..dcc682e103 100644 --- a/lib/WorseReflection/Bridge/TolerantParser/Reflection/ReflectionEnum.php +++ b/lib/WorseReflection/Bridge/TolerantParser/Reflection/ReflectionEnum.php @@ -117,7 +117,7 @@ public function isBacked(): bool public function backedType(): Type { - return NodeUtil::typeFromQualfiedNameLike($this->serviceLocator()->reflector(), $this->node, $this->node->enumType); + return NodeUtil::typeFromQualifiedNameLike($this->serviceLocator()->reflector(), $this->node, $this->node->enumType); } public function classLikeType(): string diff --git a/lib/WorseReflection/Bridge/TolerantParser/Reflection/ReflectionFunction.php b/lib/WorseReflection/Bridge/TolerantParser/Reflection/ReflectionFunction.php index 36e2b0428e..1ac31f6074 100644 --- a/lib/WorseReflection/Bridge/TolerantParser/Reflection/ReflectionFunction.php +++ b/lib/WorseReflection/Bridge/TolerantParser/Reflection/ReflectionFunction.php @@ -52,7 +52,7 @@ public function inferredType(): Type public function type(): Type { - $type = NodeUtil::typeFromQualfiedNameLike( + $type = NodeUtil::typeFromQualifiedNameLike( $this->serviceLocator->reflector(), $this->node, $this->node->returnTypeList diff --git a/lib/WorseReflection/Bridge/TolerantParser/Reflection/ReflectionObjectCreationExpression.php b/lib/WorseReflection/Bridge/TolerantParser/Reflection/ReflectionObjectCreationExpression.php index d171d5b2c4..2c7bbc5c13 100644 --- a/lib/WorseReflection/Bridge/TolerantParser/Reflection/ReflectionObjectCreationExpression.php +++ b/lib/WorseReflection/Bridge/TolerantParser/Reflection/ReflectionObjectCreationExpression.php @@ -41,7 +41,7 @@ public function class(): ReflectionClassLike $type = $this->locator->nodeContextResolver()->resolveNode($this->frame, $this->node->classTypeDesignator)->type(); if (!$type instanceof ReflectedClassType) { - throw new CouldNotResolveNode(sprintf('Expceted "%s" but got "%s"', ReflectedClassType::class, get_class($type))); + throw new CouldNotResolveNode(sprintf('Expected "%s" but got "%s"', ReflectedClassType::class, get_class($type))); } $reflection = $type->reflectionOrNull(); diff --git a/lib/WorseReflection/Bridge/TolerantParser/Reflection/TypeResolver/DeclaredMemberTypeResolver.php b/lib/WorseReflection/Bridge/TolerantParser/Reflection/TypeResolver/DeclaredMemberTypeResolver.php index cb76e99d3f..5585b3a357 100644 --- a/lib/WorseReflection/Bridge/TolerantParser/Reflection/TypeResolver/DeclaredMemberTypeResolver.php +++ b/lib/WorseReflection/Bridge/TolerantParser/Reflection/TypeResolver/DeclaredMemberTypeResolver.php @@ -27,7 +27,7 @@ public function resolveTypes(Node $tolerantNode, $declaredTypes = null, ?ClassNa return TypeFactory::undefined(); } - $type = NodeUtil::typeFromQualfiedNameLike($this->reflector, $tolerantNode, $declaredTypes, $className); + $type = NodeUtil::typeFromQualifiedNameLike($this->reflector, $tolerantNode, $declaredTypes, $className); if (!$nullable) { return $type; @@ -58,7 +58,7 @@ private function doResolve($tolerantType, ?Node $tolerantNode, ?ClassName $class return TypeFactory::undefined(); } - $type = NodeUtil::typeFromQualfiedNameLike($this->reflector, $tolerantNode, $tolerantType, $className); + $type = NodeUtil::typeFromQualifiedNameLike($this->reflector, $tolerantNode, $tolerantType, $className); $type = $type->map(function (Type $type) use ($className) { if ($className && $type instanceof SelfType) { diff --git a/lib/WorseReflection/Core/Inference/FunctionStub/ArrayPopStub.php b/lib/WorseReflection/Core/Inference/FunctionStub/ArrayPopStub.php index fac619da14..195cc1988e 100644 --- a/lib/WorseReflection/Core/Inference/FunctionStub/ArrayPopStub.php +++ b/lib/WorseReflection/Core/Inference/FunctionStub/ArrayPopStub.php @@ -25,13 +25,13 @@ public function resolve( if ($argType instanceof ArrayLiteral) { $types = $argType->types(); - $poped = array_pop($types); + $popped = array_pop($types); - if (null === $poped) { + if (null === $popped) { return $context->withType(TypeFactory::null()); } - return $context->withType($poped); + return $context->withType($popped); } $type = TypeFactory::mixed(); diff --git a/lib/WorseReflection/Core/Inference/FunctionStub/IsSomethingStub.php b/lib/WorseReflection/Core/Inference/FunctionStub/IsSomethingStub.php index 4c3bd6f803..e827f3fa3a 100644 --- a/lib/WorseReflection/Core/Inference/FunctionStub/IsSomethingStub.php +++ b/lib/WorseReflection/Core/Inference/FunctionStub/IsSomethingStub.php @@ -39,7 +39,7 @@ function (Type $type) { $argType = $arg0->type(); - // extract to a variabe as it will not otherwise work with PHP 7.4 + // extract to a variable as it will not otherwise work with PHP 7.4 $type = $this->isType; return $context->withType(new BooleanLiteralType($argType instanceof $type)); } diff --git a/lib/WorseReflection/Core/Inference/NodeToTypeConverter.php b/lib/WorseReflection/Core/Inference/NodeToTypeConverter.php index 23dad617ed..fe899cdd93 100644 --- a/lib/WorseReflection/Core/Inference/NodeToTypeConverter.php +++ b/lib/WorseReflection/Core/Inference/NodeToTypeConverter.php @@ -24,7 +24,7 @@ * This class is responsible for adjusting types according to their context * (e.g. expanding to FQNs). * - * This should not be done here but rather ealier when the docblock types are + * This should not be done here but rather earlier when the docblock types are * initially converted. * * https://github.com/phpactor/phpactor/issues/1781 diff --git a/lib/WorseReflection/Core/Inference/Resolver/AnonymousFunctionCreationExpressionResolver.php b/lib/WorseReflection/Core/Inference/Resolver/AnonymousFunctionCreationExpressionResolver.php index 511b0068a6..18676ac2af 100644 --- a/lib/WorseReflection/Core/Inference/Resolver/AnonymousFunctionCreationExpressionResolver.php +++ b/lib/WorseReflection/Core/Inference/Resolver/AnonymousFunctionCreationExpressionResolver.php @@ -18,7 +18,7 @@ class AnonymousFunctionCreationExpressionResolver implements Resolver public function resolve(NodeContextResolver $resolver, Frame $frame, Node $node): NodeContext { assert($node instanceof AnonymousFunctionCreationExpression); - $type = NodeUtil::typeFromQualfiedNameLike( + $type = NodeUtil::typeFromQualifiedNameLike( $resolver->reflector(), $node, $node->returnTypeList diff --git a/lib/WorseReflection/Core/Inference/Resolver/ArrowFunctionCreationExpressionResolver.php b/lib/WorseReflection/Core/Inference/Resolver/ArrowFunctionCreationExpressionResolver.php index 40914bd56f..9b234748c7 100644 --- a/lib/WorseReflection/Core/Inference/Resolver/ArrowFunctionCreationExpressionResolver.php +++ b/lib/WorseReflection/Core/Inference/Resolver/ArrowFunctionCreationExpressionResolver.php @@ -18,7 +18,7 @@ class ArrowFunctionCreationExpressionResolver implements Resolver public function resolve(NodeContextResolver $resolver, Frame $frame, Node $node): NodeContext { assert($node instanceof ArrowFunctionCreationExpression); - $returnType = NodeUtil::typeFromQualfiedNameLike( + $returnType = NodeUtil::typeFromQualifiedNameLike( $resolver->reflector(), $node, $node->returnTypeList diff --git a/lib/WorseReflection/Core/Inference/Resolver/BinaryExpressionResolver.php b/lib/WorseReflection/Core/Inference/Resolver/BinaryExpressionResolver.php index 126282ca32..af13a85e7b 100644 --- a/lib/WorseReflection/Core/Inference/Resolver/BinaryExpressionResolver.php +++ b/lib/WorseReflection/Core/Inference/Resolver/BinaryExpressionResolver.php @@ -211,26 +211,26 @@ private function applyTypeAssertions( return $context; } - [$reciever, $recieverContext ] = NodeUtil::canAcceptTypeAssertion( + [$receiver, $receiverContext ] = NodeUtil::canAcceptTypeAssertion( $leftOperand ) ? [$leftOperand, $leftContext] : [$rightOperand, $rightContext]; [$transmitter, $transmittingContext ] = NodeUtil::canAcceptTypeAssertion( $rightOperand ) ? [$leftOperand, $leftContext] : [$rightOperand, $rightContext]; - if (!NodeUtil::canAcceptTypeAssertion($reciever)) { + if (!NodeUtil::canAcceptTypeAssertion($receiver)) { return $context; } return match ($operator) { TokenKind::EqualsEqualsEqualsToken => $context->withTypeAssertion(TypeAssertion::forContext( - $recieverContext, + $receiverContext, fn (Type $type) => $transmittingContext->type(), // ??? fn (Type $type) => TypeCombinator::subtract($transmittingContext->type(), $type), )), TokenKind::InstanceOfKeyword => $context->withTypeAssertion(TypeAssertion::forContext( - $recieverContext, + $receiverContext, function (Type $type) use ($transmittingContext) { $type = TypeCombinator::acceptedByType($type, TypeFactory::object()); $type = TypeCombinator::narrowTo($type, $transmittingContext->type()); diff --git a/lib/WorseReflection/Core/Inference/Resolver/MemberAccess/NodeContextFromMemberAccess.php b/lib/WorseReflection/Core/Inference/Resolver/MemberAccess/NodeContextFromMemberAccess.php index d1480f0147..586467451e 100644 --- a/lib/WorseReflection/Core/Inference/Resolver/MemberAccess/NodeContextFromMemberAccess.php +++ b/lib/WorseReflection/Core/Inference/Resolver/MemberAccess/NodeContextFromMemberAccess.php @@ -149,7 +149,7 @@ private function resolveContainerMemberType( // upcast to ClassType to reflected type if (get_class($subType) === ClassType::class) { /** @phpstan-ignore-next-line */ - $subType = $subType->asReflectedClasssType($resolver->reflector()); + $subType = $subType->asReflectedClassType($resolver->reflector()); } try { diff --git a/lib/WorseReflection/Core/Inference/Resolver/ParameterResolver.php b/lib/WorseReflection/Core/Inference/Resolver/ParameterResolver.php index 16a3437b98..0e9fd8872f 100644 --- a/lib/WorseReflection/Core/Inference/Resolver/ParameterResolver.php +++ b/lib/WorseReflection/Core/Inference/Resolver/ParameterResolver.php @@ -44,7 +44,7 @@ public function resolve(NodeContextResolver $resolver, Frame $frame, Node $node) $typeDeclaration = $node->typeDeclarationList; - $type = NodeUtil::typeFromQualfiedNameLike($resolver->reflector(), $node, $node->typeDeclarationList); + $type = NodeUtil::typeFromQualifiedNameLike($resolver->reflector(), $node, $node->typeDeclarationList); if ($node->dotDotDotToken) { $type = TypeFactory::array($type); diff --git a/lib/WorseReflection/Core/Inference/Resolver/VariableResolver.php b/lib/WorseReflection/Core/Inference/Resolver/VariableResolver.php index d0b911f23d..0138977c71 100644 --- a/lib/WorseReflection/Core/Inference/Resolver/VariableResolver.php +++ b/lib/WorseReflection/Core/Inference/Resolver/VariableResolver.php @@ -58,7 +58,7 @@ public function resolve(NodeContextResolver $resolver, Frame $frame, Node $node) // special handling for assignments if ($assignment = $node->getFirstAncestor(AssignmentExpression::class)) { assert($assignment instanceof AssignmentExpression); - // if we are dealintg with the right hand side of the assignement + // if we are dealintg with the right hand side of the assignment if ($assignment->leftOperand !== $node) { // do not consider the variable being assigned to $variables = $variables->not($assignment->getStartPosition()); diff --git a/lib/WorseReflection/Core/Type/ClassType.php b/lib/WorseReflection/Core/Type/ClassType.php index b29f1c5e1e..a82083f1b0 100644 --- a/lib/WorseReflection/Core/Type/ClassType.php +++ b/lib/WorseReflection/Core/Type/ClassType.php @@ -105,7 +105,7 @@ public function emptyType(): Type return $this; } - public function asReflectedClasssType(Reflector $reflector): ReflectedClassType + public function asReflectedClassType(Reflector $reflector): ReflectedClassType { if ($this instanceof ReflectedClassType) { return $this; diff --git a/lib/WorseReflection/Core/Types.php b/lib/WorseReflection/Core/Types.php index 1aaeecf819..f7283e6b4f 100644 --- a/lib/WorseReflection/Core/Types.php +++ b/lib/WorseReflection/Core/Types.php @@ -68,7 +68,7 @@ public function merge(Types $types): self } /** - * Retrurns all class-like types + * Returns all class-like types * @return Types */ public function classLike(): Types diff --git a/lib/WorseReflection/Core/Util/NodeUtil.php b/lib/WorseReflection/Core/Util/NodeUtil.php index 4c92de1f7e..c1c837dbad 100644 --- a/lib/WorseReflection/Core/Util/NodeUtil.php +++ b/lib/WorseReflection/Core/Util/NodeUtil.php @@ -203,7 +203,7 @@ public static function dump(Node $node, int $level = 0): string /** * @param null|Node|Token $nodeOrToken */ - public static function typeFromQualfiedNameLike(Reflector $reflector, Node $node, $nodeOrToken, ?ClassName $classContext = null): Type + public static function typeFromQualifiedNameLike(Reflector $reflector, Node $node, $nodeOrToken, ?ClassName $classContext = null): Type { if ($nodeOrToken instanceof Token) { $text = (string)$nodeOrToken->getText($node->getFileContents()); @@ -247,7 +247,7 @@ public static function typeFromQualfiedNameLike(Reflector $reflector, Node $node if (null === $name) { return new MissingType(); } - return self::typeFromQualfiedNameLike($reflector, $node, $name, $classContext); + return self::typeFromQualifiedNameLike($reflector, $node, $name, $classContext); }, iterator_to_array($nodeOrToken->getElements(), true)), fn ($name) => $name !== false); return ($isIntersection ? IntersectionType::fromTypes(...$types) : UnionType::fromTypes(...$types))->reduce(); diff --git a/lib/WorseReflection/Tests/Benchmarks/fixtures/yii/ActiveRecord.php.test b/lib/WorseReflection/Tests/Benchmarks/fixtures/yii/ActiveRecord.php.test index 0dbef61960..e3f09eca3c 100644 --- a/lib/WorseReflection/Tests/Benchmarks/fixtures/yii/ActiveRecord.php.test +++ b/lib/WorseReflection/Tests/Benchmarks/fixtures/yii/ActiveRecord.php.test @@ -215,7 +215,7 @@ class ActiveRecord extends BaseActiveRecord } /** - * Filters array condition before it is assiged to a Query filter. + * Filters array condition before it is assigned to a Query filter. * * This method will ensure that an array condition only filters on existing table columns. * diff --git a/lib/WorseReflection/Tests/Benchmarks/fixtures/yii/ActiveRecordInterface.php.test b/lib/WorseReflection/Tests/Benchmarks/fixtures/yii/ActiveRecordInterface.php.test index 846b40c1eb..962964ba52 100644 --- a/lib/WorseReflection/Tests/Benchmarks/fixtures/yii/ActiveRecordInterface.php.test +++ b/lib/WorseReflection/Tests/Benchmarks/fixtures/yii/ActiveRecordInterface.php.test @@ -203,7 +203,7 @@ interface ActiveRecordInterface extends StaticInstanceInterface * // ... * } * - * // explicitly specifying the colum to search, passing a scalar or array here will always result in finding a single record + * // explicitly specifying the column to search, passing a scalar or array here will always result in finding a single record * $model = Post::findOne(['id' => Yii::$app->request->get('id')]); * * // do NOT use the following code! it is possible to inject an array condition to filter by arbitrary column values! @@ -229,7 +229,7 @@ interface ActiveRecordInterface extends StaticInstanceInterface * - an associative array of name-value pairs: query by a set of attribute values and return an array of records * matching all of them (or an empty array if none was found). Note that `['id' => 1, 2]` is treated as * a non-associative array. - * Column names are limited to current records table columns for SQL DBMS, or filtered otherwise to be limted to simple filter conditions. + * Column names are limited to current records table columns for SQL DBMS, or filtered otherwise to be limited to simple filter conditions. * - a yii\db\Expression: The expression will be used directly. (@since 2.0.37) * * This method will automatically call the `all()` method and return an array of [[ActiveRecordInterface|ActiveRecord]] @@ -271,7 +271,7 @@ interface ActiveRecordInterface extends StaticInstanceInterface * // ... * } * - * // explicitly specifying the colum to search, passing a scalar or array here will always result in finding a single record + * // explicitly specifying the column to search, passing a scalar or array here will always result in finding a single record * $model = Post::findOne(['id' => Yii::$app->request->get('id')]); * * // do NOT use the following code! it is possible to inject an array condition to filter by arbitrary column values! diff --git a/lib/WorseReflection/Tests/Benchmarks/fixtures/yii/ArrayableTrait.php.test b/lib/WorseReflection/Tests/Benchmarks/fixtures/yii/ArrayableTrait.php.test index 93b7175b8b..bde243fd83 100644 --- a/lib/WorseReflection/Tests/Benchmarks/fixtures/yii/ArrayableTrait.php.test +++ b/lib/WorseReflection/Tests/Benchmarks/fixtures/yii/ArrayableTrait.php.test @@ -104,7 +104,7 @@ trait ArrayableTrait * This method will first identify which fields to be included in the resulting array by calling [[resolveFields()]]. * It will then turn the model into an array with these fields. If `$recursive` is true, * any embedded objects will also be converted into arrays. - * When embeded objects are [[Arrayable]], their respective nested fields will be extracted and passed to [[toArray()]]. + * When embedded objects are [[Arrayable]], their respective nested fields will be extracted and passed to [[toArray()]]. * * If the model implements the [[Linkable]] interface, the resulting array will also have a `_link` element * which refers to a list of links as specified by the interface. diff --git a/lib/WorseReflection/Tests/Benchmarks/fixtures/yii/BaseActiveRecord.php.test b/lib/WorseReflection/Tests/Benchmarks/fixtures/yii/BaseActiveRecord.php.test index 536762be81..31d4faba64 100644 --- a/lib/WorseReflection/Tests/Benchmarks/fixtures/yii/BaseActiveRecord.php.test +++ b/lib/WorseReflection/Tests/Benchmarks/fixtures/yii/BaseActiveRecord.php.test @@ -180,7 +180,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface * @param string|array $condition the conditions that will be put in the WHERE part of the UPDATE SQL. * Please refer to [[Query::where()]] on how to specify this parameter. * @return int the number of rows updated - * @throws NotSupportedException if not overrided + * @throws NotSupportedException if not overridden */ public static function updateAllCounters($counters, $condition = '') { diff --git a/lib/WorseReflection/Tests/Inference/combination/union_narrow_mulitple_ancestors.test b/lib/WorseReflection/Tests/Inference/combination/union_narrow_multiple_ancestors.test similarity index 100% rename from lib/WorseReflection/Tests/Inference/combination/union_narrow_mulitple_ancestors.test rename to lib/WorseReflection/Tests/Inference/combination/union_narrow_multiple_ancestors.test diff --git a/lib/WorseReflection/Tests/Inference/if-statement/multile_nested.test b/lib/WorseReflection/Tests/Inference/if-statement/multiple_nested.test similarity index 100% rename from lib/WorseReflection/Tests/Inference/if-statement/multile_nested.test rename to lib/WorseReflection/Tests/Inference/if-statement/multiple_nested.test diff --git a/lib/WorseReflection/Tests/Integration/Bridge/TolerantParser/Reflection/ReflectionMethodTest.php b/lib/WorseReflection/Tests/Integration/Bridge/TolerantParser/Reflection/ReflectionMethodTest.php index 12192453fa..37c4476038 100644 --- a/lib/WorseReflection/Tests/Integration/Bridge/TolerantParser/Reflection/ReflectionMethodTest.php +++ b/lib/WorseReflection/Tests/Integration/Bridge/TolerantParser/Reflection/ReflectionMethodTest.php @@ -578,7 +578,7 @@ function ($methods): void { $this->assertEquals('echo "Hello!";', (string) $methods->get('barfoo')->body()); }, ]; - yield 'It reflects a method from an inteface' => [ + yield 'It reflects a method from an interface' => [ <<<'EOT' properties()); } - public function provideConsturctorPropertyPromotion(): Generator + public function provideConstructorPropertyPromotion(): Generator { yield 'Typed properties' => [ <<<'EOT' diff --git a/lib/WorseReflection/Tests/Integration/Bridge/TolerantParser/Reflection/TraitImport/TraitImportsTest.php b/lib/WorseReflection/Tests/Integration/Bridge/TolerantParser/Reflection/TraitImport/TraitImportsTest.php index 4568f8296b..484d827134 100644 --- a/lib/WorseReflection/Tests/Integration/Bridge/TolerantParser/Reflection/TraitImport/TraitImportsTest.php +++ b/lib/WorseReflection/Tests/Integration/Bridge/TolerantParser/Reflection/TraitImport/TraitImportsTest.php @@ -77,7 +77,7 @@ function (TraitImports $traitImports): void { } ]; - yield 'multiple traits with single alias maping' => [ + yield 'multiple traits with single alias mapping' => [ ' [ diff --git a/lib/WorseReflection/Tests/Integration/Core/Inference/NodeContextResolverTest.php b/lib/WorseReflection/Tests/Integration/Core/Inference/NodeContextResolverTest.php index 98e135e245..8d48fd9868 100644 --- a/lib/WorseReflection/Tests/Integration/Core/Inference/NodeContextResolverTest.php +++ b/lib/WorseReflection/Tests/Integration/Core/Inference/NodeContextResolverTest.php @@ -921,7 +921,7 @@ public function foobar(Barfoo $barfoo = 'test') , [], ['type' => '"string"', ] ]; - yield 'It shows the symbol name for a method declartion' => [ + yield 'It shows the symbol name for a method declaration' => [ <<<'EOT' expectException(CouldNotResolveNode::class); $this->expectExceptionMessage('Did not know how'); diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 7e68f73b58..483456e345 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -3346,7 +3346,7 @@ parameters: path: lib/Extension/LanguageServerCodeTransform/Tests/Benchmark/CodeAction/ImportNameProviderBench.php - - message: "#^Parameter \\$foo of function sprintf\\(\\) has invalid type strng\\.$#" + message: "#^Parameter \\$foo of function sprintf\\(\\) has invalid type string\\.$#" count: 1 path: lib/Extension/LanguageServerCodeTransform/Tests/Empty/sprintf.php @@ -5946,7 +5946,7 @@ parameters: path: lib/WorseReflection/Bridge/TolerantParser/Reflection/TraitImport/TraitImports.php - - message: "#^Parameter \\#2 \\$node of static method Phpactor\\\\WorseReflection\\\\Core\\\\Util\\\\NodeUtil\\:\\:typeFromQualfiedNameLike\\(\\) expects Microsoft\\\\PhpParser\\\\Node, Microsoft\\\\PhpParser\\\\Node\\|null given\\.$#" + message: "#^Parameter \\#2 \\$node of static method Phpactor\\\\WorseReflection\\\\Core\\\\Util\\\\NodeUtil\\:\\:typeFromQualifiedNameLike\\(\\) expects Microsoft\\\\PhpParser\\\\Node, Microsoft\\\\PhpParser\\\\Node\\|null given\\.$#" count: 1 path: lib/WorseReflection/Bridge/TolerantParser/Reflection/TypeResolver/DeclaredMemberTypeResolver.php @@ -6336,7 +6336,7 @@ parameters: path: lib/WorseReflection/Core/Util/NodeUtil.php - - message: "#^Parameter \\#3 \\$nodeOrToken of static method Phpactor\\\\WorseReflection\\\\Core\\\\Util\\\\NodeUtil\\:\\:typeFromQualfiedNameLike\\(\\) expects Microsoft\\\\PhpParser\\\\Node\\|Microsoft\\\\PhpParser\\\\Token\\|null, mixed given\\.$#" + message: "#^Parameter \\#3 \\$nodeOrToken of static method Phpactor\\\\WorseReflection\\\\Core\\\\Util\\\\NodeUtil\\:\\:typeFromQualifiedNameLike\\(\\) expects Microsoft\\\\PhpParser\\\\Node\\|Microsoft\\\\PhpParser\\\\Token\\|null, mixed given\\.$#" count: 1 path: lib/WorseReflection/Core/Util/NodeUtil.php diff --git a/tests/Unit/Extension/ClassMover/Rpc/ClassCopyHandlerTest.php b/tests/Unit/Extension/ClassMover/Rpc/ClassCopyHandlerTest.php index 3f0cfd295a..2c891784c3 100644 --- a/tests/Unit/Extension/ClassMover/Rpc/ClassCopyHandlerTest.php +++ b/tests/Unit/Extension/ClassMover/Rpc/ClassCopyHandlerTest.php @@ -16,8 +16,8 @@ class ClassCopyHandlerTest extends HandlerTestCase { - const SOURCE_PATH = 'souce_path'; - const DEST_PATH = 'souce_path'; + const SOURCE_PATH = 'source_path'; + const DEST_PATH = 'source_path'; /** * @var ObjectProphecy diff --git a/tests/Unit/Extension/ClassMover/Rpc/ClassMoveHandlerTest.php b/tests/Unit/Extension/ClassMover/Rpc/ClassMoveHandlerTest.php index 43c6389028..c61e002a9a 100644 --- a/tests/Unit/Extension/ClassMover/Rpc/ClassMoveHandlerTest.php +++ b/tests/Unit/Extension/ClassMover/Rpc/ClassMoveHandlerTest.php @@ -21,7 +21,7 @@ class ClassMoveHandlerTest extends HandlerTestCase { - const SOURCE_PATH = 'souce_path'; + const SOURCE_PATH = 'source_path'; const DEST_PATH = 'dest_path'; private ObjectProphecy $classMover; diff --git a/tests/Unit/Extension/PhpVersionResolver/Model/ChainResolverTest.php b/tests/Unit/Extension/PhpVersionResolver/Model/ChainResolverTest.php index 968f84b91b..493fedcf0e 100644 --- a/tests/Unit/Extension/PhpVersionResolver/Model/ChainResolverTest.php +++ b/tests/Unit/Extension/PhpVersionResolver/Model/ChainResolverTest.php @@ -12,7 +12,7 @@ class ChainResolverTest extends TestCase { use ProphecyTrait; - public function testThrowsExceptionIfNoVeresionCanBeResolved(): void + public function testThrowsExceptionIfNoVersionCanBeResolved(): void { $this->expectException(RuntimeException::class); (new ChainResolver())->resolve(); diff --git a/tests/VimPlugin/apply_text_edits/replace_a_line.vader b/tests/VimPlugin/apply_text_edits/replace_a_line.vader index 4b9fff8e2c..5e65626390 100644 --- a/tests/VimPlugin/apply_text_edits/replace_a_line.vader +++ b/tests/VimPlugin/apply_text_edits/replace_a_line.vader @@ -26,7 +26,7 @@ Execute (Goes to the method line and changes the visibility): Then (The cursor should not have moved): call AssertCursorDidntMove() -Expect php (The visibility shoud have changed): +Expect php (The visibility should have changed):