Browse Source

Update project CS

SpacePossum 3 years ago
parent
commit
d5c68510ee

+ 1 - 1
doc/ruleSets/PhpCsFixer.rst

@@ -12,7 +12,7 @@ Rules
 - `array_indentation <./../rules/whitespace/array_indentation.rst>`_
 - `blank_line_before_statement <./../rules/whitespace/blank_line_before_statement.rst>`_
   config:
-  ``['statements' => ['break', 'case', 'continue', 'declare', 'default', 'exit', 'goto', 'include', 'include_once', 'require', 'require_once', 'return', 'switch', 'throw', 'try']]``
+  ``['statements' => ['break', 'case', 'continue', 'declare', 'default', 'exit', 'goto', 'include', 'include_once', 'phpdoc', 'require', 'require_once', 'return', 'switch', 'throw', 'try']]``
 - `combine_consecutive_issets <./../rules/language_construct/combine_consecutive_issets.rst>`_
 - `combine_consecutive_unsets <./../rules/language_construct/combine_consecutive_unsets.rst>`_
 - `empty_loop_body <./../rules/control_structure/empty_loop_body.rst>`_

+ 1 - 1
doc/rules/whitespace/blank_line_before_statement.rst

@@ -235,7 +235,7 @@ The rule is part of the following rule sets:
 @PhpCsFixer
   Using the `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_ rule set will enable the ``blank_line_before_statement`` rule with the config below:
 
-  ``['statements' => ['break', 'case', 'continue', 'declare', 'default', 'exit', 'goto', 'include', 'include_once', 'require', 'require_once', 'return', 'switch', 'throw', 'try']]``
+  ``['statements' => ['break', 'case', 'continue', 'declare', 'default', 'exit', 'goto', 'include', 'include_once', 'phpdoc', 'require', 'require_once', 'return', 'switch', 'throw', 'try']]``
 
 @Symfony
   Using the `@Symfony <./../../ruleSets/Symfony.rst>`_ rule set will enable the ``blank_line_before_statement`` rule with the config below:

+ 1 - 0
src/Console/Report/FixReport/JunitReporter.php

@@ -43,6 +43,7 @@ final class JunitReporter implements ReporterInterface
 
         $dom = new \DOMDocument('1.0', 'UTF-8');
         $testsuites = $dom->appendChild($dom->createElement('testsuites'));
+
         /** @var \DomElement $testsuite */
         $testsuite = $testsuites->appendChild($dom->createElement('testsuite'));
         $testsuite->setAttribute('name', 'PHP CS Fixer');

+ 1 - 0
src/Fixer/PhpTag/BlankLineAfterOpeningTagFixer.php

@@ -70,6 +70,7 @@ final class BlankLineAfterOpeningTagFixer extends AbstractFixer implements White
         }
 
         $newlineFound = false;
+
         /** @var Token $token */
         foreach ($tokens as $token) {
             if ($token->isWhitespace() && str_contains($token->getContent(), "\n")) {

+ 1 - 0
src/RuleSet/Sets/PhpCsFixerSet.php

@@ -38,6 +38,7 @@ final class PhpCsFixerSet extends AbstractRuleSetDescription
                     'goto',
                     'include',
                     'include_once',
+                    'phpdoc',
                     'require',
                     'require_once',
                     'return',

+ 1 - 0
tests/Fixer/Alias/NoAliasFunctionsFixerTest.php

@@ -255,6 +255,7 @@ abstract class A
     private function provideAllCases(): \Generator
     {
         $reflectionConstant = new \ReflectionClassConstant(\PhpCsFixer\Fixer\Alias\NoAliasFunctionsFixer::class, 'SETS');
+
         /** @var array<string, string[]> $allAliases */
         $allAliases = $reflectionConstant->getValue();
 

+ 1 - 0
tests/Tokenizer/TokensTest.php

@@ -464,6 +464,7 @@ class FooBar
 }
 PHP;
         $tokens = Tokens::fromCode($source);
+
         /** @var Token[] $found */
         $found = $tokens->findGivenKind(T_CLASS);
         static::assertCount(1, $found);