Skip to content

Commit 9901dcf

Browse files
committed
Make argument type clearer
1 parent 437f8f3 commit 9901dcf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Magento2/Sniffs/Legacy/MageEntitySniff.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,22 +77,22 @@ public function process(File $phpcsFile, $stackPtr)
7777
return;
7878
}
7979
$entityName = $tokens[$stackPtr]['content'];
80-
$error = [$entityName . $tokens[$oldPosition]['content']];
80+
$error = $entityName . $tokens[$oldPosition]['content'];
8181
} else {
8282
$oldPosition = $stackPtr;
8383
$stackPtr = $phpcsFile->findNext(T_STRING, $oldPosition + 1, null, false, null, true);
8484
if ($stackPtr === false) {
8585
return;
8686
}
8787
$entityName = $tokens[$stackPtr]['content'];
88-
$error = [$tokens[$oldPosition]['content'] . ' ' . $entityName];
88+
$error = $tokens[$oldPosition]['content'] . ' ' . $entityName;
8989
}
9090
if ($entityName === $this->legacyEntity || $this->isPrefixLegacy($entityName)) {
9191
$phpcsFile->addError(
9292
$this->errorMessage,
9393
$stackPtr,
9494
$this->errorCode,
95-
$error
95+
[$error]
9696
);
9797
}
9898
}

0 commit comments

Comments
 (0)