Skip to content

Commit 6987325

Browse files
committed
Fix remaining phpcs issues
1 parent d463140 commit 6987325

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

Magento2/Tests/Eslint/AbstractEslintTestCase.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ abstract class AbstractEslintTestCase extends TestCase
2424
*/
2525
protected function assertFileContainsError(string $testFile, array $expectedMessages): void
2626
{
27+
// phpcs:disable
2728
exec(
2829
'npm run eslint -- Magento2/Tests/Eslint/' . $testFile,
2930
$output

Magento2/Tests/Legacy/InstallUpgradeUnitTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313
class InstallUpgradeUnitTest extends AbstractSniffUnitTest
1414
{
15+
/**
16+
* @var string[]
17+
*/
1518
private $wrongFileNames = [
1619
'data-install-.inc',
1720
'data-upgrade-.inc',

Magento2/Tests/Legacy/_files/RestrictedCodeUnitTest/Magento/Framework/Model/ResourceModel/Iterator.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
2-
3-
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
4-
52
/**
63
* Copyright © Magento, Inc. All rights reserved.
74
* See COPYING.txt for license details.
85
*/
6+
namespace Magento2\Tests\Legacy\_files\RestrictedCodeUnitTest\Magento\Framework\Model\ResourceModel;
7+
8+
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
99

1010
/**
1111
* This is NOT actually a test, but a file that must be ignored by RestrictedCodeSniff
@@ -15,22 +15,22 @@
1515
*/
1616
class IteratorDummyFile extends AbstractSniffUnitTest
1717
{
18-
protected function shouldSkipTest()
18+
protected function shouldSkipTest(): bool
1919
{
2020
return true;
2121
}
2222

23-
protected function getErrorList()
23+
protected function getErrorList(): array
2424
{
2525
return [];
2626
}
2727

28-
protected function getWarningList()
28+
protected function getWarningList(): array
2929
{
3030
return [];
3131
}
3232

33-
private function withProtectedClass()
33+
private function withProtectedClass(): Zend_Db_Expr
3434
{
3535
return new \Zend_Db_Expr();
3636
}

Magento2/Tests/PHPCompatibility/Util/TestHelperPHPCompatibility.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public function process(File $phpcsFile, $stackPtr)
4747
{
4848
}
4949

50+
/* phpcs:disable */
5051
/**
5152
* Wrapper to make the protected parent::isNumber() method testable.
5253
*
@@ -87,4 +88,5 @@ public function isNumericCalculation(File $phpcsFile, $start, $end)
8788
{
8889
return parent::isNumericCalculation($phpcsFile, $start, $end);
8990
}
91+
/* phpcs:enable */
9092
}

0 commit comments

Comments
 (0)