File tree 2 files changed +4
-0
lines changed
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
388
388
389
389
if (\in_array ((string ) $ operation ['class ' ], [GetCollection::class, Post::class], true )) {
390
390
$ 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 ' ]));
391
393
}
392
394
393
395
$ 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
324
324
325
325
if (\in_array ((string ) $ class , [GetCollection::class, Post::class], true )) {
326
326
$ 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 ));
327
329
}
328
330
329
331
$ data [] = array_merge ($ datum , [
You can’t perform that action at this time.
0 commit comments