Skip to content

Commit

Permalink
Apply DeclareAfterOpeningTagFixer (#657)
Browse files Browse the repository at this point in the history
  • Loading branch information
kubawerlos committed Nov 22, 2021
1 parent d506db6 commit 97b47b7
Show file tree
Hide file tree
Showing 129 changed files with 130 additions and 385 deletions.
2 changes: 2 additions & 0 deletions .dev-tools/phpcs.xml
Expand Up @@ -14,6 +14,8 @@

<rule ref='PSR12'>
<exclude name='Generic.Files.LineLength' />
<exclude name='PSR12.Files.FileHeader.SpacingAfterBlock' />
<exclude name='PSR12.Files.OpenTag.NotAlone' />
</rule>

</ruleset>
4 changes: 1 addition & 3 deletions .dev-tools/src/Fixer/OrderedClassElementsInternalFixer.php
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

/*
* This file is part of PHP CS Fixer: custom fixers.
Expand All @@ -9,8 +9,6 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace PhpCsFixerCustomFixersDev\Fixer;

use PhpCsFixer\Fixer\FixerInterface;
Expand Down
4 changes: 1 addition & 3 deletions .dev-tools/src/Fixer/PriorityInternalFixer.php
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

/*
* This file is part of PHP CS Fixer: custom fixers.
Expand All @@ -9,8 +9,6 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace PhpCsFixerCustomFixersDev\Fixer;

use PhpCsFixer\Fixer\FixerInterface;
Expand Down
4 changes: 1 addition & 3 deletions .dev-tools/src/Fixers.php
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

/*
* This file is part of PHP CS Fixer: custom fixers.
Expand All @@ -9,8 +9,6 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace PhpCsFixerCustomFixersDev;

use PhpCsFixer\Fixer\FixerInterface;
Expand Down
4 changes: 1 addition & 3 deletions .dev-tools/src/InfectionConfigBuilder.php
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

/*
* This file is part of PHP CS Fixer: custom fixers.
Expand All @@ -9,8 +9,6 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace PhpCsFixerCustomFixersDev;

use Infection\Mutator\ProfileList;
Expand Down
4 changes: 1 addition & 3 deletions .dev-tools/src/OrderedClassElementsFixerWrapper.php
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

/*
* This file is part of PHP CS Fixer: custom fixers.
Expand All @@ -9,8 +9,6 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace PhpCsFixerCustomFixersDev;

use PhpCsFixer\Fixer\ClassNotation\OrderedClassElementsFixer;
Expand Down
4 changes: 1 addition & 3 deletions .dev-tools/src/Priority/PriorityCollection.php
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

/*
* This file is part of PHP CS Fixer: custom fixers.
Expand All @@ -9,8 +9,6 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace PhpCsFixerCustomFixersDev\Priority;

use PhpCsFixer\Fixer\FixerInterface;
Expand Down
4 changes: 1 addition & 3 deletions .dev-tools/src/Priority/PriorityFixer.php
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

/*
* This file is part of PHP CS Fixer: custom fixers.
Expand All @@ -9,8 +9,6 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace PhpCsFixerCustomFixersDev\Priority;

use PhpCsFixer\Fixer\FixerInterface;
Expand Down
4 changes: 1 addition & 3 deletions .dev-tools/src/Readme/ReadmeCommand.php
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

/*
* This file is part of PHP CS Fixer: custom fixers.
Expand All @@ -9,8 +9,6 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace PhpCsFixerCustomFixersDev\Readme;

use PhpCsFixer\Console\Command\HelpCommand;
Expand Down
5 changes: 1 addition & 4 deletions .php-cs-fixer.php
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

/*
* This file is part of PHP CS Fixer: custom fixers.
Expand All @@ -9,8 +9,6 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

require_once __DIR__ . '/.dev-tools/vendor/kubawerlos/php-cs-fixer-config/src/Rules/RulesInterface.php';
require_once __DIR__ . '/.dev-tools/vendor/kubawerlos/php-cs-fixer-config/src/Rules/LibraryRules.php';
$rules = (new PhpCsFixerConfig\Rules\LibraryRules('PHP CS Fixer: custom fixers', 'Kuba Werłos', 2018))->getRules();
Expand All @@ -33,7 +31,6 @@
unset($rules['modernize_strpos']); // TODO: remove when dropping support to PHP <8.0
unset($rules['use_arrow_functions']); // TODO: remove when dropping support to PHP <7.4
unset($rules[PhpCsFixerCustomFixers\Fixer\PromotedConstructorPropertyFixer::name()]); // TODO: remove when dropping support to PHP <8.0
unset($rules[PhpCsFixerCustomFixers\Fixer\DeclareAfterOpeningTagFixer::name()]); // Only to have PR with this fixer smaller

foreach (new PhpCsFixerCustomFixersDev\Fixers() as $fixer) {
$rules[$fixer->getName()] = true;
Expand Down
4 changes: 1 addition & 3 deletions src/Analyzer/Analysis/ArgumentAnalysis.php
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

/*
* This file is part of PHP CS Fixer: custom fixers.
Expand All @@ -9,8 +9,6 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace PhpCsFixerCustomFixers\Analyzer\Analysis;

/**
Expand Down
4 changes: 1 addition & 3 deletions src/Analyzer/Analysis/ArrayElementAnalysis.php
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

/*
* This file is part of PHP CS Fixer: custom fixers.
Expand All @@ -9,8 +9,6 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace PhpCsFixerCustomFixers\Analyzer\Analysis;

/**
Expand Down
4 changes: 1 addition & 3 deletions src/Analyzer/Analysis/CaseAnalysis.php
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

/*
* This file is part of PHP CS Fixer: custom fixers.
Expand All @@ -9,8 +9,6 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace PhpCsFixerCustomFixers\Analyzer\Analysis;

/**
Expand Down
4 changes: 1 addition & 3 deletions src/Analyzer/Analysis/ConstructorAnalysis.php
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

/*
* This file is part of PHP CS Fixer: custom fixers.
Expand All @@ -9,8 +9,6 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace PhpCsFixerCustomFixers\Analyzer\Analysis;

use PhpCsFixer\Tokenizer\CT;
Expand Down
4 changes: 1 addition & 3 deletions src/Analyzer/Analysis/DataProviderAnalysis.php
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

/*
* This file is part of PHP CS Fixer: custom fixers.
Expand All @@ -9,8 +9,6 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace PhpCsFixerCustomFixers\Analyzer\Analysis;

/**
Expand Down
4 changes: 1 addition & 3 deletions src/Analyzer/Analysis/SwitchAnalysis.php
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

/*
* This file is part of PHP CS Fixer: custom fixers.
Expand All @@ -9,8 +9,6 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace PhpCsFixerCustomFixers\Analyzer\Analysis;

/**
Expand Down
4 changes: 1 addition & 3 deletions src/Analyzer/ArrayAnalyzer.php
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

/*
* This file is part of PHP CS Fixer: custom fixers.
Expand All @@ -9,8 +9,6 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace PhpCsFixerCustomFixers\Analyzer;

use PhpCsFixer\Tokenizer\CT;
Expand Down
4 changes: 1 addition & 3 deletions src/Analyzer/ConstructorAnalyzer.php
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

/*
* This file is part of PHP CS Fixer: custom fixers.
Expand All @@ -9,8 +9,6 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace PhpCsFixerCustomFixers\Analyzer;

use PhpCsFixer\Tokenizer\Token;
Expand Down
4 changes: 1 addition & 3 deletions src/Analyzer/DataProviderAnalyzer.php
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

/*
* This file is part of PHP CS Fixer: custom fixers.
Expand All @@ -9,8 +9,6 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace PhpCsFixerCustomFixers\Analyzer;

use PhpCsFixer\Preg;
Expand Down
4 changes: 1 addition & 3 deletions src/Analyzer/FunctionAnalyzer.php
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

/*
* This file is part of PHP CS Fixer: custom fixers.
Expand All @@ -9,8 +9,6 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace PhpCsFixerCustomFixers\Analyzer;

use PhpCsFixer\Tokenizer\Tokens;
Expand Down
4 changes: 1 addition & 3 deletions src/Analyzer/SwitchAnalyzer.php
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

/*
* This file is part of PHP CS Fixer: custom fixers.
Expand All @@ -9,8 +9,6 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace PhpCsFixerCustomFixers\Analyzer;

use PhpCsFixer\Tokenizer\Tokens;
Expand Down
4 changes: 1 addition & 3 deletions src/Fixer/AbstractFixer.php
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

/*
* This file is part of PHP CS Fixer: custom fixers.
Expand All @@ -9,8 +9,6 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace PhpCsFixerCustomFixers\Fixer;

use PhpCsFixer\Fixer\FixerInterface;
Expand Down
4 changes: 1 addition & 3 deletions src/Fixer/CommentSurroundedBySpacesFixer.php
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

/*
* This file is part of PHP CS Fixer: custom fixers.
Expand All @@ -9,8 +9,6 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace PhpCsFixerCustomFixers\Fixer;

use PhpCsFixer\FixerDefinition\CodeSample;
Expand Down
4 changes: 1 addition & 3 deletions src/Fixer/CommentedOutFunctionFixer.php
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

/*
* This file is part of PHP CS Fixer: custom fixers.
Expand All @@ -9,8 +9,6 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace PhpCsFixerCustomFixers\Fixer;

use PhpCsFixer\Fixer\ConfigurableFixerInterface;
Expand Down
4 changes: 1 addition & 3 deletions src/Fixer/ConstructorEmptyBracesFixer.php
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

/*
* This file is part of PHP CS Fixer: custom fixers.
Expand All @@ -9,8 +9,6 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace PhpCsFixerCustomFixers\Fixer;

use PhpCsFixer\FixerDefinition\CodeSample;
Expand Down
4 changes: 1 addition & 3 deletions src/Fixer/DataProviderNameFixer.php
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

/*
* This file is part of PHP CS Fixer: custom fixers.
Expand All @@ -9,8 +9,6 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace PhpCsFixerCustomFixers\Fixer;

use PhpCsFixer\Fixer\ConfigurableFixerInterface;
Expand Down

0 comments on commit 97b47b7

Please sign in to comment.