Skip to content

Commit 515563c

Browse files
committed
AC-601: Create phpcs static check for AbstractBlockTest
1 parent 9d650e1 commit 515563c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Magento2/Sniffs/Legacy/AbstractBlockSniff.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ public function process(File $phpcsFile, $stackPtr)
6868
}
6969

7070
/**
71+
* Get the quantity of parameters on a method
72+
*
7173
* @param File $phpcsFile
7274
* @param int $methodHtmlPosition
7375
* @return int
@@ -76,11 +78,11 @@ private function getParametersCount(File $phpcsFile, int $methodHtmlPosition): i
7678
{
7779
$closePosition = $phpcsFile->getTokens()[$methodHtmlPosition +1]['parenthesis_closer'];
7880
$getTokenAsContent = $phpcsFile->getTokensAsString(
79-
$methodHtmlPosition + 2,
81+
$methodHtmlPosition + 2,
8082
($closePosition - $methodHtmlPosition) - 2
8183
);
8284
if ($getTokenAsContent) {
83-
$parameters = explode(',' , $getTokenAsContent);
85+
$parameters = explode(',', $getTokenAsContent);
8486
return count($parameters);
8587
}
8688
return 0;

0 commit comments

Comments
 (0)