diff --git a/src/AnnotationGenerator/ApiPlatformCoreAnnotationGenerator.php b/src/AnnotationGenerator/ApiPlatformCoreAnnotationGenerator.php index 6a2d6a6c..0b883890 100644 --- a/src/AnnotationGenerator/ApiPlatformCoreAnnotationGenerator.php +++ b/src/AnnotationGenerator/ApiPlatformCoreAnnotationGenerator.php @@ -66,7 +66,7 @@ public function generateClassAnnotations(string $className): array * * @return array */ - private function validateClassOperations(array $operations) + private function validateClassOperations(array $operations): array { $resolver = new OptionsResolver(); $resolver->setDefaults(['item' => [], 'collection' => []]); @@ -83,7 +83,7 @@ private function validateClassOperations(array $operations) * * @return array */ - private function validateClassOperationMethodConfig(array $methodConfig) + private function validateClassOperationMethodConfig(array $methodConfig): array { $resolver = new OptionsResolver(); diff --git a/src/TypesGenerator.php b/src/TypesGenerator.php index 13fb1d8e..b92485c1 100644 --- a/src/TypesGenerator.php +++ b/src/TypesGenerator.php @@ -474,7 +474,7 @@ private function isEnum(\EasyRdf_Resource $type): bool * * @return array */ - private function getParentClasses(\EasyRdf_Resource $resource, array $parentClasses = []) + private function getParentClasses(\EasyRdf_Resource $resource, array $parentClasses = []): array { if ([] === $parentClasses) { return $this->getParentClasses($resource, [$resource->getUri()]); @@ -509,7 +509,7 @@ private function getParentClasses(\EasyRdf_Resource $resource, array $parentClas * * @return array */ - private function createPropertiesMap(array $types) + private function createPropertiesMap(array $types): array { $typesAsString = []; $map = []; @@ -592,7 +592,7 @@ private function fieldToAdderRemoverTypeHint(array $field, array $classes): ?str * * @return array $class */ - private function generateField(array $config, array $class, \EasyRdf_Resource $type, $typeName, $propertyName, \EasyRdf_Resource $property = null) + private function generateField(array $config, array $class, \EasyRdf_Resource $type, $typeName, $propertyName, \EasyRdf_Resource $property = null): array { $typeConfig = $config['types'][$typeName] ?? null; $typesDefined = !empty($config['types']);