Skip to content

Commit c13c01c

Browse files
committed
MAGETWO-69964: PHPCS cannot parse correctly syntax of PHP 7.x return types
1 parent f6a2cec commit c13c01c

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
lines changed

composer.lock

Lines changed: 25 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/tests/static/framework/Magento/Sniffs/EchoTags/ShortEchoSyntaxSniff.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
*/
66
namespace Magento\Sniffs\EchoTags;
77

8-
use PHP_CodeSniffer_File;
9-
use PHP_CodeSniffer_Sniff;
10-
use PHP_CodeSniffer_Tokens;
8+
use PHP_CodeSniffer\Sniffs\Sniff;
9+
use PHP_CodeSniffer\Files\File;
10+
use PHP_CodeSniffer\Util\Tokens;
1111

12-
class ShortEchoSyntaxSniff implements PHP_CodeSniffer_Sniff
12+
class ShortEchoSyntaxSniff implements Sniff
1313
{
1414
/**
1515
* {@inheritdoc}
@@ -22,7 +22,7 @@ public function register()
2222
/**
2323
* {@inheritdoc}
2424
*/
25-
public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
25+
public function process(File $phpcsFile, $stackPtr)
2626
{
2727
$tokens = $phpcsFile->getTokens();
2828
$openTag = $tokens[$stackPtr];
@@ -32,7 +32,7 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
3232
return;
3333
}
3434

35-
$nextToken = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr + 1), null, true);
35+
$nextToken = $phpcsFile->findNext(Tokens::$emptyTokens, ($stackPtr + 1), null, true);
3636
if ($tokens[$nextToken]['code'] == T_ECHO) {
3737
$phpcsFile->addError(
3838
'Short echo tag syntax must be used; expected "<?=" but found "<?php echo"',

0 commit comments

Comments
 (0)