@@ -50,14 +50,14 @@ protected function attributes(): array
50
50
return [
51
51
'summary ' => Type::STRING ,
52
52
'description ' => Type::STRING ,
53
- 'get ' => Operation::class,
54
- 'put ' => Operation::class,
55
- 'post ' => Operation::class,
56
- 'delete ' => Operation::class,
57
- 'options ' => Operation::class,
58
- 'head ' => Operation::class,
59
- 'patch ' => Operation::class,
60
- 'trace ' => Operation::class,
53
+ 'get ' => [ Operation::class] ,
54
+ 'put ' => [ Operation::class] ,
55
+ 'post ' => [ Operation::class] ,
56
+ 'delete ' => [ Operation::class] ,
57
+ 'options ' => [ Operation::class] ,
58
+ 'head ' => [ Operation::class] ,
59
+ 'patch ' => [ Operation::class] ,
60
+ 'trace ' => [ Operation::class] ,
61
61
'servers ' => [Server::class],
62
62
'parameters ' => [Parameter::class],
63
63
];
@@ -116,7 +116,7 @@ public function getOperations()
116
116
{
117
117
$ operations = [];
118
118
foreach ($ this ->attributes () as $ attribute => $ type ) {
119
- if ($ type === Operation::class && isset ($ this ->$ attribute )) {
119
+ if (\is_array ( $ type) && $ type [ 0 ] === Operation::class && isset ($ this ->$ attribute )) {
120
120
$ operations [$ attribute ] = $ this ->$ attribute ;
121
121
}
122
122
}
0 commit comments