Skip to content

Commit d6e0b77

Browse files
committed
Removed unused variables in FunctionCommentSniff.php
1 parent 4c8b297 commit d6e0b77

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dev/tests/static/Magento/Sniffs/Commenting/FunctionCommentSniff.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ protected function processReturn(File $phpcsFile, $stackPtr, $commentStart)
6868
$phpcsFile->addError($error, $return, 'MissingReturnType');
6969
} else {
7070
// Support both a return type and a description.
71-
$split = preg_match('`^((?:\|?(?:array\([^\)]*\)|[\\\\a-z0-9\[\]]+))*)( .*)?`i', $content, $returnParts);
71+
preg_match('`^((?:\|?(?:array\([^\)]*\)|[\\\\a-z0-9\[\]]+))*)( .*)?`i', $content, $returnParts);
7272
if (isset($returnParts[1]) === false) {
7373
return;
7474
}
@@ -78,7 +78,7 @@ protected function processReturn(File $phpcsFile, $stackPtr, $commentStart)
7878
// Check return type (can be multiple, separated by '|').
7979
$typeNames = explode('|', $returnType);
8080
$suggestedNames = array();
81-
foreach ($typeNames as $i => $typeName) {
81+
foreach ($typeNames as $typeName) {
8282
$suggestedName = Common::suggestType($typeName);
8383
if (in_array($suggestedName, $suggestedNames) === false) {
8484
$suggestedNames[] = $suggestedName;
@@ -460,7 +460,7 @@ protected function processParams(File $phpcsFile, $stackPtr, $commentStart)
460460
$phpcsFile->fixer->replaceToken(($param['tag'] + 2), $content);
461461

462462
// Fix up the indent of additional comment lines.
463-
foreach ($param['commentLines'] as $lineNum => $line) {
463+
foreach ($param['commentLines'] as $lineNum) {
464464
if ($lineNum === 0
465465
|| $param['commentLines'][$lineNum]['indent'] === 0
466466
) {

0 commit comments

Comments
 (0)