Просмотр исходного кода

fix: Replace mention of bracket with parenthesis (#7336)

Co-authored-by: Greg Korba <greg@codito.dev>
Andreas Möller 1 год назад
Родитель
Сommit
2403e0cee0

+ 1 - 1
doc/list.rst

@@ -1034,7 +1034,7 @@ List of Available Rules
    `Source PhpCsFixer\\Fixer\\FunctionNotation\\ImplodeCallFixer <./../src/Fixer/FunctionNotation/ImplodeCallFixer.php>`_
 -  `include <./rules/control_structure/include.rst>`_
 
-   Include/Require and file path should be divided with a single space. File path should not be placed under brackets.
+   Include/Require and file path should be divided with a single space. File path should not be placed within parentheses.
 
    Part of rule sets `@PhpCsFixer <./ruleSets/PhpCsFixer.rst>`_ `@Symfony <./ruleSets/Symfony.rst>`_
 

+ 1 - 1
doc/rules/control_structure/include.rst

@@ -3,7 +3,7 @@ Rule ``include``
 ================
 
 Include/Require and file path should be divided with a single space. File path
-should not be placed under brackets.
+should not be placed within parentheses.
 
 Examples
 --------

+ 1 - 1
doc/rules/index.rst

@@ -281,7 +281,7 @@ Control Structure
   Empty loop-condition must be in configured style.
 - `include <./control_structure/include.rst>`_
 
-  Include/Require and file path should be divided with a single space. File path should not be placed under brackets.
+  Include/Require and file path should be divided with a single space. File path should not be placed within parentheses.
 - `no_alternative_syntax <./control_structure/no_alternative_syntax.rst>`_
 
   Replace control structure alternative syntax to use braces.

+ 1 - 1
src/Fixer/Alias/EregToPregFixer.php

@@ -97,7 +97,7 @@ final class EregToPregFixer extends AbstractFixer
 
                 // findSequence also returns the tokens, but we're only interested in the indices, i.e.:
                 // 0 => function name,
-                // 1 => bracket "("
+                // 1 => parenthesis "("
                 // 2 => quoted string passed as 1st parameter
                 $match = array_keys($match);
 

+ 1 - 1
src/Fixer/ControlStructure/IncludeFixer.php

@@ -32,7 +32,7 @@ final class IncludeFixer extends AbstractFixer
     public function getDefinition(): FixerDefinitionInterface
     {
         return new FixerDefinition(
-            'Include/Require and file path should be divided with a single space. File path should not be placed under brackets.',
+            'Include/Require and file path should be divided with a single space. File path should not be placed within parentheses.',
             [
                 new CodeSample(
                     '<?php

+ 1 - 1
src/Fixer/Semicolon/MultilineWhitespaceBeforeSemicolonsFixer.php

@@ -136,7 +136,7 @@ $object->method1()
 
                 $content = $previous->getContent();
                 if (str_starts_with($content, $lineEnding) && $tokens[$index - 2]->isComment()) {
-                    // if there is comment between closing bracket and semicolon
+                    // if there is comment between closing parenthesis and semicolon
 
                     // unset whitespace and semicolon
                     $tokens->clearAt($previousIndex);