-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enable rule fully_qualified_strict_types.phpdoc_tags = \[] to prevent…
… php-cs-fixer stripping Namespaces out of comments (#30)
- Loading branch information
Showing
6 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
namespace drupol\PhpCsFixerConfigsDrupal\Tests\Integration; | ||
|
||
use drupol\PhpCsFixerConfigsDrupal\Config\Drupal8; | ||
use drupol\PhpCsFixerConfigsDrupal\Tests\IntegrationTestCase; | ||
use PhpCsFixer\FixerFactory; | ||
use PhpCsFixer\RuleSet\RuleSet; | ||
|
||
/** | ||
* @author Kevin Wenger <[email protected]> | ||
* | ||
* Covers the PHP-CS-Fixer rules fully_qualified_strict_types.phpdoc_tags | ||
* | ||
* @internal | ||
*/ | ||
final class Scenario8Test extends IntegrationTestCase | ||
{ | ||
protected function getScenarioPath(): string | ||
{ | ||
return __DIR__ . '/fixtures/scenario8'; | ||
} | ||
|
||
public function testDrupal8Config(): void | ||
{ | ||
$drupal8 = new Drupal8(); | ||
$rules = $drupal8->getRules(); | ||
$ruleset = new RuleSet($rules); | ||
|
||
$factory = (new FixerFactory()) | ||
->registerBuiltInFixers() | ||
->registerCustomFixers($drupal8->getCustomFixers()) | ||
->useRuleSet($ruleset); | ||
|
||
$fixers = []; | ||
foreach ($factory->getFixers() as $fixer) { | ||
$fixers[$fixer->getName()] = $fixer; | ||
} | ||
|
||
$this->doTest($fixers); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace Foo; | ||
|
||
class Bar { | ||
|
||
} | ||
|
||
class Baz { | ||
|
||
/** | ||
* @var \Foo\Bar $bar | ||
* The Bar class. | ||
*/ | ||
private Bar $bar; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace Foo; | ||
|
||
class Bar { | ||
|
||
} | ||
|
||
class Baz { | ||
|
||
/** | ||
* @var \Foo\Bar | ||
* The Bar class. | ||
*/ | ||
private Bar $bar; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters