8000 Merge pull request #6621 from Codeception/phpcs-ignore-in-generated-f… · Codeception/Codeception@b19fd77 · GitHub
[go: up one dir, main page]

Skip to content

Commit b19fd77

Browse files
authored
Merge pull request #6621 from Codeception/phpcs-ignore-in-generated-files
Disable phpcs checks in generated action files
2 parents 0621728 + bd7f60a commit b19fd77

File tree

5 files changed

+9
-11
lines changed

5 files changed

+9
-11
lines changed

src/Codeception/Lib/Generator/Actions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ class Actions
3636

3737
protected string $template = <<<EOF
3838
<?php //[STAMP] {{hash}}
39+
// phpcs:ignoreFile
3940
namespace {{namespace}}_generated;
4041
4142
// This class was automatically generated by build task
4243
// You should not change it manually as it will be overwritten on next build
43-
// @codingStandardsIgnoreFile
4444
4545
trait {{name}}Actions
4646
{

tests/cli/BuildCest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public function buildsActionsForAClass(CliGuy $I): void
3131
$I->seeInThisFile('class CliGuy extends \Codeception\Actor');
3232
$I->seeInThisFile('use _generated\CliGuyActions');
3333
$I->seeFileFound('CliGuyActions.php', 'tests/support/_generated');
34+
$I->seeThisFileMatches("!^<\?php .*\n// phpcs:ignoreFile!");
3435
$I->seeInThisFile('seeFileFound(');
3536
$I->seeInThisFile('public function assertSame($expected, $actual, string $message = "") {');
3637
}

tests/data/claypit/c3.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
2-
3-
// @codingStandardsIgnoreFile
2+
// phpcs:ignoreFile
43
// @codeCoverageIgnoreStart
54

65
/**

tests/unit/Codeception/Lib/Console/MessageTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ public function testCut()
1818
}
1919

2020
//test message cutting
21-
// @codingStandardsIgnoreStart
2221
public function testVeryLongTestNameVeryLongTestNameVeryLongTestNameVeryLongTestNameVeryLongTestNameVeryLongTestNameVeryLongTestName()
2322
{
2423
$this->expectNotToPerformAssertions();
25-
// @codingStandardsIgnoreEnd
2624
}
2725

2826
// test multibyte message width

tests/unit/Codeception/Lib/ModuleContainerTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
use Codeception\Stub;
1313
use Codeception\Test\Unit;
1414

15-
// @codingStandardsIgnoreFile
1615
class ModuleContainerTest extends Unit
1716
{
1817
protected \CodeGuy $tester;
@@ -232,12 +231,13 @@ public function testShortConfigParts()
232231
$config = [
233232
'modules' => [
234233
'enabled' => [
235-
['\Codeception\Lib\PartedModule' => [
236-
'part' => 'one'
237-
]
238-
]
234+
[
235+
'\Codeception\Lib\PartedModule' => [
236+
'part' => 'one'
237+
],
238+
],
239239
],
240-
]
240+
],
241241
];
242242
$this->moduleContainer = new ModuleContainer(Stub::make(\Codeception\Lib\Di::class), $config);
243243
$this->moduleContainer->create('\Codeception\Lib\PartedModule');

0 commit comments

Comments
 (0)
0