Skip to content

Commit c5545d1

Browse files
committed
Adds sort to order expected keys
Without this sort the order of argument name and type matter. But we accually don't care about the order. Only name and type are allowed but the order doesn't matter.
1 parent 899b409 commit c5545d1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/DocBlock/Tags/Method.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ private function filterArguments($arguments)
218218
$argument['type'] = new Void_();
219219
}
220220
$keys = array_keys($argument);
221+
sort($keys);
221222
if ($keys !== [ 'name', 'type' ]) {
222223
throw new \InvalidArgumentException(
223224
'Arguments can only have the "name" and "type" fields, found: ' . var_export($keys, true)

0 commit comments

Comments
 (0)