File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -388,6 +388,8 @@ private function buildOperations(\SimpleXMLElement $resource, array $root): ?arr
388388
389389 if (\in_array ((string ) $ operation ['class ' ], [GetCollection::class, Post::class], true )) {
390390 $ datum ['itemUriTemplate ' ] = $ this ->phpize ($ operation , 'itemUriTemplate ' , 'string ' );
391+ } elseif (isset ($ operation ['itemUriTemplate ' ])) {
392+ throw new InvalidArgumentException (sprintf ('"itemUriTemplate" option is not allowed on a %s operation. ' , $ operation ['class ' ]));
391393 }
392394
393395 $ data [] = array_merge ($ datum , [
Original file line number Diff line number Diff line change @@ -324,6 +324,8 @@ private function buildOperations(array $resource, array $root): ?array
324324
325325 if (\in_array ((string ) $ class , [GetCollection::class, Post::class], true )) {
326326 $ datum ['itemUriTemplate ' ] = $ this ->phpize ($ operation , 'itemUriTemplate ' , 'string ' );
327+ } elseif (isset ($ operation ['itemUriTemplate ' ])) {
328+ throw new InvalidArgumentException (sprintf ('"itemUriTemplate" option is not allowed on a %s operation. ' , $ class ));
327329 }
328330
329331 $ data [] = array_merge ($ datum , [
You can’t perform that action at this time.
0 commit comments