Skip to content

Commit 4205403

Browse files
committed
FIX for apparently random API failures while using array types
If the webapi Interface class was using CR+LF end-of-line, TypeProcessor class was not able to determine the class name when an array was used.
1 parent f8b1e47 commit 4205403

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/Magento/Framework/Reflection/TypeProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ public function getParamType(ParameterReflection $param)
523523
if ($type == 'array') {
524524
// try to determine class, if it's array of objects
525525
$docBlock = $param->getDeclaringFunction()->getDocBlock();
526-
$pattern = "/\@param\s+([\w\\\_]+\[\])\s+\\\${$param->getName()}\n/";
526+
$pattern = "/\@param\s+([\w\\\_]+\[\])\s+\\\${$param->getName()}[\n\r]/";
527527
$matches = [];
528528
if (preg_match($pattern, $docBlock->getContents(), $matches)) {
529529
return $matches[1];

0 commit comments

Comments
 (0)