Skip to content

Commit 019646c

Browse files
committed
Fix Static Tests failure, related to non-existing class reference
1 parent d0218e1 commit 019646c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/internal/Magento/Framework/TestFramework/Unit/Helper/ObjectManager.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ protected function _getMockWithoutConstructorCall($className)
155155
*/
156156
public function getObject($className, array $arguments = [])
157157
{
158+
// phpstan:ignore
158159
if (is_subclass_of($className, \Magento\Framework\Api\AbstractSimpleObjectBuilder::class)
159160
|| is_subclass_of($className, \Magento\Framework\Api\Builder::class)
160161
) {
@@ -333,13 +334,12 @@ public function getCollectionMock($className, array $data)
333334
*/
334335
private function _getMockObject($argClassName, array $arguments)
335336
{
337+
// phpstan:ignore
336338
if (is_subclass_of($argClassName, \Magento\Framework\Api\ExtensibleObjectBuilder::class)) {
337-
$object = $this->getBuilder($argClassName, $arguments);
338-
return $object;
339-
} else {
340-
$object = $this->_createArgumentMock($argClassName, $arguments);
341-
return $object;
339+
return $this->getBuilder($argClassName, $arguments);
342340
}
341+
342+
return $this->_createArgumentMock($argClassName, $arguments);
343343
}
344344

345345
/**

0 commit comments

Comments
 (0)