Skip to content

Commit

Permalink
Update project CS
Browse files Browse the repository at this point in the history
  • Loading branch information
SpacePossum committed Dec 13, 2021
1 parent ef752ba commit d5c6851
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/ruleSets/PhpCsFixer.rst
Expand Up @@ -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>`_
Expand Down
2 changes: 1 addition & 1 deletion doc/rules/whitespace/blank_line_before_statement.rst
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions src/Console/Report/FixReport/JunitReporter.php
Expand Up @@ -43,6 +43,7 @@ public function generate(ReportSummary $reportSummary): string

$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');
Expand Down
1 change: 1 addition & 0 deletions src/Fixer/PhpTag/BlankLineAfterOpeningTagFixer.php
Expand Up @@ -70,6 +70,7 @@ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
}

$newlineFound = false;

/** @var Token $token */
foreach ($tokens as $token) {
if ($token->isWhitespace() && str_contains($token->getContent(), "\n")) {
Expand Down
1 change: 1 addition & 0 deletions src/RuleSet/Sets/PhpCsFixerSet.php
Expand Up @@ -38,6 +38,7 @@ public function getRules(): array
'goto',
'include',
'include_once',
'phpdoc',
'require',
'require_once',
'return',
Expand Down
1 change: 1 addition & 0 deletions tests/Fixer/Alias/NoAliasFunctionsFixerTest.php
Expand Up @@ -255,6 +255,7 @@ public function provideFix81Cases(): \Generator
private function provideAllCases(): \Generator
{
$reflectionConstant = new \ReflectionClassConstant(\PhpCsFixer\Fixer\Alias\NoAliasFunctionsFixer::class, 'SETS');

/** @var array<string, string[]> $allAliases */
$allAliases = $reflectionConstant->getValue();

Expand Down
1 change: 1 addition & 0 deletions tests/Tokenizer/TokensTest.php
Expand Up @@ -464,6 +464,7 @@ public function bar()
}
PHP;
$tokens = Tokens::fromCode($source);

/** @var Token[] $found */
$found = $tokens->findGivenKind(T_CLASS);
static::assertCount(1, $found);
Expand Down

0 comments on commit d5c6851

Please sign in to comment.