Skip to content

Commit 64fc3c2

Browse files
phoenix128ronak2ram
authored andcommitted
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 7d62c64 commit 64fc3c2

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
@@ -555,7 +555,7 @@ public function getParamType(ParameterReflection $param)
555555
if ($type == 'array') {
556556
// try to determine class, if it's array of objects
557557
$docBlock = $param->getDeclaringFunction()->getDocBlock();
558-
$pattern = "/\@param\s+([\w\\\_]+\[\])\s+\\\${$param->getName()}\n/";
558+
$pattern = "/\@param\s+([\w\\\_]+\[\])\s+\\\${$param->getName()}[\n\r]/";
559559
$matches = [];
560560
if (preg_match($pattern, $docBlock->getContents(), $matches)) {
561561
return $matches[1];

0 commit comments

Comments
 (0)