Skip to content

Commit d528ca7

Browse files
committed
AC-2841:Fixed static test failure
1 parent b396948 commit d528ca7

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

app/code/Magento/Deploy/Service/DeployStaticFile.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ public function deployFile(string $fileName, array $params = []): string
105105
* @param string $path
106106
* @return void
107107
* @throws FileSystemException
108+
* phpcs:disable
108109
*/
109110
public function deleteFile(string $path)
110111
{
@@ -129,6 +130,7 @@ public function deleteFile(string $path)
129130
* @param string $filePath
130131
* @return string|false
131132
* @throws FileSystemException
133+
* phpcs:enable
132134
*/
133135
public function readFile(string $fileName, string $filePath): bool|string
134136
{

lib/internal/Magento/Framework/GetReflectionMethodReturnTypeValueTrait.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ private function getReturnTypeValue(\ReflectionMethod $method): ?string
2929
$returnTypeValue[] = $type->getName();
3030
}
3131

32-
$returnTypeValue = implode(
32+
return implode(
3333
$returnType instanceof \ReflectionUnionType ? '|' : '&',
3434
$returnTypeValue
3535
);
36-
} else {
37-
$className = $method->getDeclaringClass()->getName();
38-
$returnTypeValue = ($returnType->allowsNull() && $returnType->getName() !== 'mixed' ? '?' : '');
39-
$returnTypeValue .= ($returnType->getName() === 'self')
40-
? $className ? '\\' . ltrim($className, '\\') : ''
41-
: $returnType->getName();
4236
}
37+
38+
$className = $method->getDeclaringClass()->getName();
39+
$returnTypeValue = ($returnType->allowsNull() && $returnType->getName() !== 'mixed' ? '?' : '');
40+
$returnTypeValue .= ($returnType->getName() === 'self')
41+
? $className ? '\\' . ltrim($className, '\\') : ''
42+
: $returnType->getName();
4343
}
4444

4545
return $returnTypeValue;

0 commit comments

Comments
 (0)