Skip to content

Commit 7dcb598

Browse files
committed
Fixes after code review
1 parent bcbaa13 commit 7dcb598

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

lib/internal/Magento/Framework/Code/Reader/NamespaceResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ function ($token) {
112112
T_NAME_QUALIFIED => T_NAME_QUALIFIED,
113113
T_NAME_FULLY_QUALIFIED => T_NAME_FULLY_QUALIFIED
114114
];
115-
if (isset($token[0]) && \array_key_exists($token[0], $whitelist)) {
115+
if (isset($token[0], $whitelist[$token[0]])) {
116116
return true;
117117
}
118118
return false;

lib/internal/Magento/Framework/DB/AbstractMapper.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function map(CriteriaInterface $criteria)
126126
if (!is_array($value)) {
127127
throw new \InvalidArgumentException('Wrong type of argument, expecting array for '. $mapperMethod);
128128
}
129-
call_user_func_array([$this, $mapperMethod], array_values($value));
129+
call_user_func_array([$this, $mapperMethod], ...[$value]);
130130
}
131131
}
132132
return $this->select;
@@ -395,8 +395,9 @@ protected function getConditionFieldName($fieldName)
395395
* Hook for operations before rendering filters
396396
*
397397
* @return void
398+
* phpcs:ignore Magento2.CodeAnalysis.EmptyBlock
398399
*/
399-
protected function renderFiltersBefore() //phpcs:ignore Magento2.CodeAnalysis.EmptyBlock
400+
protected function renderFiltersBefore()
400401
{
401402
}
402403

lib/internal/Magento/Framework/View/Layout/Generator/Block.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ protected function generateAction($block, $methodName, $actionArguments)
299299
$profilerKey = 'BLOCK_ACTION:' . $block->getNameInLayout() . '>' . $methodName;
300300
\Magento\Framework\Profiler::start($profilerKey);
301301
$args = $this->evaluateArguments($actionArguments);
302-
call_user_func_array([$block, $methodName], array_values($args));
302+
call_user_func_array([$block, $methodName], ...[$args]);
303303
\Magento\Framework\Profiler::stop($profilerKey);
304304
}
305305

setup/src/Magento/Setup/Module/Di/Code/Reader/FileScanner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ protected function scan()
207207
if ($this->tokenType === T_WHITESPACE) {
208208
goto SCANNER_NAMESPACE_CONTINUE;
209209
}
210-
if (\array_key_exists($this->tokenType, $namespaceContentTokenTypes)) {
210+
if (isset($namespaceContentTokenTypes[$this->tokenType])) {
211211
$infos[$infoIndex]['namespace'] .= $tokenContent;
212212
}
213213

0 commit comments

Comments
 (0)