diff --git a/composer.json b/composer.json index c9c9e6e..5f45476 100644 --- a/composer.json +++ b/composer.json @@ -35,10 +35,10 @@ }, "require-dev": { "jetbrains/phpstorm-attributes": "^1", - "phpunit/phpunit": "^9.5.10", + "phpunit/phpunit": "^9.6.8", "psalm/plugin-phpunit": "^0.18.4", - "squizlabs/php_codesniffer": "^3.7.1", - "vimeo/psalm": "^5.4" + "squizlabs/php_codesniffer": "^3.7.2", + "vimeo/psalm": "^5.12" }, "autoload": { "psr-4": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index c91d200..e094557 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,8 +1,9 @@ diff --git a/src/Attribute/AttributeParser.php b/src/Attribute/AttributeParser.php index ae590cb..215ce6d 100644 --- a/src/Attribute/AttributeParser.php +++ b/src/Attribute/AttributeParser.php @@ -18,6 +18,7 @@ use ReflectionProperty; use function array_merge; +use function array_reverse; use function is_string; final class AttributeParser implements ModelProviderInterface @@ -161,7 +162,7 @@ private function createLabel(LabelInterface $label): Model\Label */ public function getLabels(): array { - return $this->labels; + return array_reverse($this->labels); } private function createParameter(ParameterInterface $parameter): Model\Parameter diff --git a/src/Model/ModelProviderChain.php b/src/Model/ModelProviderChain.php index cee154c..9599813 100644 --- a/src/Model/ModelProviderChain.php +++ b/src/Model/ModelProviderChain.php @@ -6,6 +6,7 @@ use function array_map; use function array_merge; +use function array_reverse; use function array_values; final class ModelProviderChain implements ModelProviderInterface @@ -40,10 +41,12 @@ public function getLinks(): array public function getLabels(): array { return array_merge( - ...array_map( - /** @psalm-return list