diff --git a/src/Command/GraphQL/RebuildDefinitionsCommand.php b/src/Command/GraphQL/RebuildDefinitionsCommand.php index f64d56b2..53784c66 100644 --- a/src/Command/GraphQL/RebuildDefinitionsCommand.php +++ b/src/Command/GraphQL/RebuildDefinitionsCommand.php @@ -41,15 +41,16 @@ protected function configure() } /** - * - * @deprecated Use Pimcore\Bundle\DataHubBundle\Command\Configuration\RebuildWorkspacesCommand instead. * * @param InputInterface $input * @param OutputInterface $output * - * @return int|void|null + * @return int * * @throws \Exception + * + *@deprecated Use Pimcore\Bundle\DataHubBundle\Command\Configuration\RebuildWorkspacesCommand instead. + * */ public function execute(InputInterface $input, OutputInterface $output) { diff --git a/src/Configuration.php b/src/Configuration.php index 42a56638..df551e9c 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -83,6 +83,9 @@ public function __construct($type, $path, $name = null, $configuration = null) $this->setConfiguration($configuration ?? []); } + /** + * @return array + */ public function getObjectVars() { $data = parent::getObjectVars(); @@ -133,24 +136,18 @@ public function getModificationDate() return $this->modificationDate; } - /** - * @return string - */ public function getType(): string { return $this->type; } - /** - * @param string $type - */ public function setType(string $type): void { $this->type = $type; } /** - * @param mixed $configuration + * @param array|null $configuration */ public function setConfiguration($configuration): void { @@ -164,7 +161,7 @@ public function setConfiguration($configuration): void } /** - * @return mixed + * @return array */ public function getConfiguration() { @@ -182,33 +179,21 @@ public function setName($name): void $this->name = $name; } - /** - * @return string|null - */ public function getName(): ?string { return $this->name; } - /** - * @return string|null - */ public function getGroup(): ?string { return $this->group; } - /** - * @param string|null $group - */ public function setGroup(?string $group): void { $this->group = $group; } - /** - * @return string|null - */ public function getSqlObjectCondition(): ?string { return $this->configuration && $this->configuration['general'] ? $this->configuration['general']['sqlObjectCondition'] ?? null : null; @@ -238,9 +223,6 @@ public function setPath($path): void $this->path = $path; } - /** - * @return string|null - */ public function getPath(): ?string { return $this->path; @@ -306,9 +288,6 @@ public function save(): void \Pimcore::getEventDispatcher()->dispatch($event, ConfigurationEvents::CONFIGURATION_POST_SAVE); } - /** - * @return void - */ public function delete(): void { if (!$this->isAllowed('delete')) { @@ -349,9 +328,6 @@ public static function getByName($name): ?self } } - /** - * @return array - */ public function getQueryEntities(): array { $schema = $this->configuration['schema'] ?? null; @@ -361,9 +337,6 @@ public function getQueryEntities(): array return $entities; } - /** - * @return array - */ public function getSpecialEntities(): array { $schema = $this->configuration['schema'] ?? null; @@ -372,9 +345,6 @@ public function getSpecialEntities(): array return $entities; } - /** - * @return array - */ public function getMutationEntities(): array { $schema = $this->configuration['schema'] ?? null; diff --git a/src/Configuration/Dao.php b/src/Configuration/Dao.php index ba137887..2d643a2e 100644 --- a/src/Configuration/Dao.php +++ b/src/Configuration/Dao.php @@ -88,6 +88,11 @@ public function delete(): void $this->deleteData($this->model->getName()); } + /** + * @param array $data + * + * @return void + */ public function setVariables($data) { $this->model->setConfiguration($data); @@ -146,11 +151,12 @@ public static function getByName($name) /** * - * @deprecated will be removed with pimcore 11 + * @return int + * + *@deprecated will be removed with pimcore 11 * * get latest modification date of configuration file. * - * @return bool|int */ public static function getConfigModificationDate() { @@ -160,7 +166,7 @@ public static function getConfigModificationDate() /** * get the whole configuration file content. * - * @return array|mixed|null + * @return array */ private function &getConfig() { diff --git a/src/Configuration/Workspace/AbstractWorkspace.php b/src/Configuration/Workspace/AbstractWorkspace.php index 9ec77a7e..bdfeaa64 100644 --- a/src/Configuration/Workspace/AbstractWorkspace.php +++ b/src/Configuration/Workspace/AbstractWorkspace.php @@ -58,65 +58,41 @@ abstract class AbstractWorkspace extends AbstractModel */ public $delete = false; - /** - * @return string - */ public function getConfiguration(): string { return $this->configuration; } - /** - * @param string $configuration - */ public function setConfiguration(string $configuration): void { $this->configuration = $configuration; } - /** - * @return int - */ public function getCid(): int { return $this->cid; } - /** - * @param int $cid - */ public function setCid(int $cid): void { $this->cid = $cid; } - /** - * @return string - */ public function getCpath(): string { return $this->cpath; } - /** - * @param string $cpath - */ public function setCpath(string $cpath): void { $this->cpath = $cpath; } - /** - * @return bool - */ public function isCreate(): bool { return $this->create; } - /** - * @param bool $create - */ public function setCreate(bool $create): void { $this->create = $create; @@ -130,41 +106,26 @@ public function getRead() return $this->read; } - /** - * @param bool $read - */ public function setRead(bool $read): void { $this->read = $read; } - /** - * @return bool - */ public function isUpdate(): bool { return $this->update; } - /** - * @param bool $update - */ public function setUpdate(bool $update): void { $this->update = $update; } - /** - * @return bool - */ public function isDelete(): bool { return $this->delete; } - /** - * @param bool $delete - */ public function setDelete(bool $delete): void { $this->delete = $delete; diff --git a/src/Controller/ConfigController.php b/src/Controller/ConfigController.php index 4fb97402..5d1e9556 100644 --- a/src/Controller/ConfigController.php +++ b/src/Controller/ConfigController.php @@ -121,9 +121,9 @@ public function listAction(Request $request): JsonResponse * * @param Request $request * - * @return JsonResponse + * @return JsonResponse|null * - * @throws \Exception + * @throws ConfigWriteException */ public function deleteAction(Request $request): ?JsonResponse { @@ -162,9 +162,9 @@ public function deleteAction(Request $request): ?JsonResponse * * @param Request $request * - * @throws \Exception + * @return JsonResponse|null * - * @return JsonResponse + * @throws ConfigWriteException */ public function addAction(Request $request): ?JsonResponse { @@ -200,9 +200,7 @@ public function addAction(Request $request): ?JsonResponse * * @param Request $request * - * @throws \Exception - * - * @return JsonResponse + * @return JsonResponse|null */ public function cloneAction(Request $request): ?JsonResponse { @@ -243,10 +241,11 @@ public function cloneAction(Request $request): ?JsonResponse * * @param Request $request * @param Service $graphQlService - * - * @throws \Exception + * @param EventDispatcherInterface $eventDispatcher * * @return JsonResponse + * + * @throws \Exception */ public function getAction(Request $request, Service $graphQlService, EventDispatcherInterface $eventDispatcher): JsonResponse { @@ -397,9 +396,7 @@ public function getAction(Request $request, Service $graphQlService, EventDispat * * @param Request $request * - * @throws \Exception - * - * @return JsonResponse + * @return JsonResponse|null */ public function saveAction(Request $request): ?JsonResponse { @@ -483,9 +480,9 @@ public function saveAction(Request $request): ?JsonResponse * @param RouterInterface $routingService * @param Request $request * - * @throws \Exception + * @return JsonResponse|null * - * @return JsonResponse + * @throws \Exception */ public function getExplorerUrlAction(RouterInterface $routingService, Request $request): ?JsonResponse { diff --git a/src/Controller/WebserviceController.php b/src/Controller/WebserviceController.php index cb3c0043..bdb98352 100644 --- a/src/Controller/WebserviceController.php +++ b/src/Controller/WebserviceController.php @@ -18,6 +18,7 @@ use GraphQL\Error\DebugFlag; use GraphQL\Error\Warning; use GraphQL\GraphQL; +use GraphQL\Server\RequestError; use GraphQL\Validator\DocumentValidator; use GraphQL\Validator\Rules\DisableIntrospection; use Pimcore\Bundle\DataHubBundle\Configuration; @@ -66,9 +67,6 @@ class WebserviceController extends FrontendController */ private $uploadService; - /** - * @param EventDispatcherInterface $eventDispatcher - */ public function __construct( EventDispatcherInterface $eventDispatcher, CheckConsumerPermissionsService $permissionsService, @@ -86,10 +84,11 @@ public function __construct( * @param LocaleServiceInterface $localeService * @param Factory $modelFactory * @param Request $request + * @param LongRunningHelper $longRunningHelper * * @return JsonResponse * - * @throws \Exception + * @throws RequestError */ public function webonyxAction( Service $service, diff --git a/src/DependencyInjection/Compiler/CustomDocumentTypePass.php b/src/DependencyInjection/Compiler/CustomDocumentTypePass.php index 22836988..d828a766 100644 --- a/src/DependencyInjection/Compiler/CustomDocumentTypePass.php +++ b/src/DependencyInjection/Compiler/CustomDocumentTypePass.php @@ -35,9 +35,6 @@ class CustomDocumentTypePass implements CompilerPassInterface { - /** - * @param ContainerBuilder $container - */ public function process(ContainerBuilder $container) { $documentTypeService = $container->getDefinition(DocumentType::class); diff --git a/src/DependencyInjection/Compiler/ImportExportLocatorsPass.php b/src/DependencyInjection/Compiler/ImportExportLocatorsPass.php index 0becebe0..a980a1a0 100644 --- a/src/DependencyInjection/Compiler/ImportExportLocatorsPass.php +++ b/src/DependencyInjection/Compiler/ImportExportLocatorsPass.php @@ -39,9 +39,6 @@ class ImportExportLocatorsPass implements CompilerPassInterface { - /** - * @param ContainerBuilder $container - */ public function process(ContainerBuilder $container) { $this->processGeneralTypes($container); @@ -67,9 +64,6 @@ public function process(ContainerBuilder $container) $this->registerPropertyDataTypes($container); } - /** - * @param ContainerBuilder $container - */ protected function processGeneralTypes(ContainerBuilder $container) { $graphQLServiceDefinition = $container->getDefinition(Service::class); @@ -91,9 +85,6 @@ protected function processGeneralTypes(ContainerBuilder $container) ); } - /** - * @param ContainerBuilder $container - */ protected function processAssetTypes(ContainerBuilder $container) { $graphQLServiceDefinition = $container->getDefinition(Service::class); @@ -120,13 +111,6 @@ protected function processTranslationTypes(ContainerBuilder $container) ); } - /** - * @param ContainerBuilder $container - * @param Definition $definition - * @param string $type - * @param string $tag - * @param string $argument - */ private function createLocatorForTaggedServices( ContainerBuilder $container, Definition $definition, @@ -203,9 +187,6 @@ private function buildSupportedGeneralTypes( $definition->addMethodCall('setSupportedGeneralTypes', [array_keys($mapping)]); } - /** - * @param ContainerBuilder $container - */ protected function processDataObjectQueryTypes(ContainerBuilder $container) { $graphQLServiceDefinition = $container->getDefinition(Service::class); @@ -278,9 +259,6 @@ private function buildSupportedDataObjectDataTypes( $definition->addMethodCall('setSupportedDataObject' . ucfirst($operationType) . 'DataTypes', [array_keys($mapping)]); } - /** - * @param ContainerBuilder $container - */ protected function processDataObjectMutationTypes(ContainerBuilder $container) { $graphQLServiceDefinition = $container->getDefinition(Service::class); @@ -310,9 +288,6 @@ protected function processDataObjectMutationTypes(ContainerBuilder $container) ); } - /** - * @param ContainerBuilder $container - */ protected function processDocumentElementMutationTypes(ContainerBuilder $container) { $graphQLServiceDefinition = $container->getDefinition(Service::class); @@ -334,9 +309,6 @@ protected function processDocumentElementMutationTypes(ContainerBuilder $contain ); } - /** - * @param ContainerBuilder $container - */ protected function processDocumentElementQueryTypes(ContainerBuilder $container) { $graphQLServiceDefinition = $container->getDefinition(Service::class); @@ -401,9 +373,6 @@ private function buildSupportedDocumentElementDataTypes( $definition->addMethodCall('setSupportedDocumentElement' . ucfirst($operationType) . 'DataTypes', [array_keys($mapping)]); } - /** - * @param ContainerBuilder $container - */ protected function processCsFeatureQueryTypes(ContainerBuilder $container) { $graphQLServiceDefinition = $container->getDefinition(Service::class); @@ -468,9 +437,6 @@ private function buildSupportedCsFeatureDataTypes( $definition->addMethodCall('setSupportedCsFeature' . ucfirst($operationType) . 'DataTypes', [array_keys($mapping)]); } - /** - * @param ContainerBuilder $container - */ private function registerAssetDataTypes( ContainerBuilder $container ) { @@ -508,36 +474,24 @@ private function registerElementTypes( $graphQLServiceDefinition->addMethodCall($methodCall, [$dataTypes]); } - /** - * @param ContainerBuilder $container - */ private function registerDataObjectDataTypes( ContainerBuilder $container ) { $this->registerElementTypes($container, 'pimcore.datahub.graphql.dataobjecttype', 'registerDataObjectDataTypes'); } - /** - * @param ContainerBuilder $container - */ private function registerDocumentDataTypes( ContainerBuilder $container ) { $this->registerElementTypes($container, 'pimcore.datahub.graphql.documenttype', 'registerDocumentDataTypes'); } - /** - * @param ContainerBuilder $container - */ private function registerClassificationStoreDataTypes( ContainerBuilder $container ) { $this->registerElementTypes($container, 'pimcore.datahub.graphql.cstype', 'registerClassificationStoreDataTypes'); } - /** - * @param ContainerBuilder $container - */ private function registerPropertyDataTypes( ContainerBuilder $container ) { diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 45964833..a313f911 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -48,9 +48,6 @@ public function getConfigTreeBuilder() return $treeBuilder; } - /** - * @param ArrayNodeDefinition|NodeDefinition $rootNode - */ private function addConfigurationsNode(ArrayNodeDefinition | NodeDefinition $rootNode) { $rootNode diff --git a/src/DependencyInjection/PimcoreDataHubExtension.php b/src/DependencyInjection/PimcoreDataHubExtension.php index 4cdc3e8e..865820e7 100644 --- a/src/DependencyInjection/PimcoreDataHubExtension.php +++ b/src/DependencyInjection/PimcoreDataHubExtension.php @@ -40,9 +40,6 @@ public function load(array $configs, ContainerBuilder $container) $loader->load('config.yml'); } - /** - * @param ContainerBuilder $container - */ public function prepend(ContainerBuilder $container) { if ($container->hasExtension('doctrine_migrations')) { diff --git a/src/Event/GraphQL/Model/ExecutorEvent.php b/src/Event/GraphQL/Model/ExecutorEvent.php index 563b25bc..1545044d 100644 --- a/src/Event/GraphQL/Model/ExecutorEvent.php +++ b/src/Event/GraphQL/Model/ExecutorEvent.php @@ -71,9 +71,6 @@ public function getSchema() return $this->schema; } - /** - * @param Schema $schema - */ public function setSchema(Schema $schema) { $this->schema = $schema; @@ -87,9 +84,6 @@ public function getContext() return $this->context; } - /** - * @param array $context - */ public function setContext(array $context) { $this->context = $context; diff --git a/src/Event/GraphQL/Model/ExecutorResultEvent.php b/src/Event/GraphQL/Model/ExecutorResultEvent.php index f3f2987e..eb6ac9f3 100644 --- a/src/Event/GraphQL/Model/ExecutorResultEvent.php +++ b/src/Event/GraphQL/Model/ExecutorResultEvent.php @@ -39,18 +39,11 @@ public function getResult() return $this->result; } - /** - * @param ExecutionResult $result - */ public function setResult(ExecutionResult $result) { $this->result = $result; } - /** - * @param Request $request - * @param ExecutionResult $result - */ public function __construct(Request $request, ExecutionResult $result) { $this->request = $request; diff --git a/src/Event/GraphQL/Model/ListingEvent.php b/src/Event/GraphQL/Model/ListingEvent.php index 95ccc93d..dbf067a4 100644 --- a/src/Event/GraphQL/Model/ListingEvent.php +++ b/src/Event/GraphQL/Model/ListingEvent.php @@ -41,65 +41,41 @@ class ListingEvent extends Event */ protected $resolveInfo; - /** - * @return AbstractListing - */ public function getListing(): AbstractListing { return $this->listing; } - /** - * @param AbstractListing $listing - */ public function setListing(AbstractListing $listing) { $this->listing = $listing; } - /** - * @return array - */ public function getArgs(): array { return $this->args; } - /** - * @param array $args - */ public function setArgs(array $args): void { $this->args = $args; } - /** - * @return array - */ public function getContext(): array { return $this->context; } - /** - * @param array $context - */ public function setContext(array $context): void { $this->context = $context; } - /** - * @return ResolveInfo - */ public function getResolveInfo(): ResolveInfo { return $this->resolveInfo; } - /** - * @param ResolveInfo $resolveInfo - */ public function setResolveInfo(ResolveInfo $resolveInfo): void { $this->resolveInfo = $resolveInfo; diff --git a/src/Event/GraphQL/Model/MutationTypeEvent.php b/src/Event/GraphQL/Model/MutationTypeEvent.php index 1f93ae19..a021430e 100644 --- a/src/Event/GraphQL/Model/MutationTypeEvent.php +++ b/src/Event/GraphQL/Model/MutationTypeEvent.php @@ -38,41 +38,26 @@ public function getMutationType() return $this->mutationType; } - /** - * @param MutationType $mutationType - */ public function setMutationType(MutationType $mutationType) { $this->mutationType = $mutationType; } - /** - * @return array - */ public function getConfig(): array { return $this->config; } - /** - * @param array $config - */ public function setConfig(array $config): void { $this->config = $config; } - /** - * @return array - */ public function getContext(): array { return $this->context; } - /** - * @param array $context - */ public function setContext(array $context): void { $this->context = $context; diff --git a/src/Event/GraphQL/Model/OutputCachePreLoadEvent.php b/src/Event/GraphQL/Model/OutputCachePreLoadEvent.php index d1faae33..7e127e68 100644 --- a/src/Event/GraphQL/Model/OutputCachePreLoadEvent.php +++ b/src/Event/GraphQL/Model/OutputCachePreLoadEvent.php @@ -49,18 +49,11 @@ public function isUseCache() return $this->useCache; } - /** - * @param bool $useCache - */ public function setUseCache(bool $useCache) { $this->useCache = $useCache; } - /** - * @param Request $request - * @param bool $useCache - */ public function __construct(Request $request, bool $useCache) { $this->request = $request; diff --git a/src/Event/GraphQL/Model/OutputCachePreSaveEvent.php b/src/Event/GraphQL/Model/OutputCachePreSaveEvent.php index b3e19f19..a407fe9a 100644 --- a/src/Event/GraphQL/Model/OutputCachePreSaveEvent.php +++ b/src/Event/GraphQL/Model/OutputCachePreSaveEvent.php @@ -52,18 +52,11 @@ public function getResponse() return $this->response; } - /** - * @param Response $response - */ public function setResponse(Response $response) { $this->response = $response; } - /** - * @param Request $request - * @param Response $response - */ public function __construct(Request $request, Response $response) { $this->request = $request; diff --git a/src/Event/GraphQL/Model/PermissionEvent.php b/src/Event/GraphQL/Model/PermissionEvent.php index 6ef34628..d4b2a183 100644 --- a/src/Event/GraphQL/Model/PermissionEvent.php +++ b/src/Event/GraphQL/Model/PermissionEvent.php @@ -52,33 +52,21 @@ public function setElement($element): void $this->element = $element; } - /** - * @return string - */ public function getType(): string { return $this->type; } - /** - * @param string $type - */ public function setType(string $type): void { $this->type = $type; } - /** - * @return bool - */ public function isGranted(): bool { return $this->isGranted; } - /** - * @param bool $isGranted - */ public function setIsGranted(bool $isGranted): void { $this->isGranted = $isGranted; diff --git a/src/Event/GraphQL/Model/QueryTypeEvent.php b/src/Event/GraphQL/Model/QueryTypeEvent.php index 68d6ca88..b019c255 100644 --- a/src/Event/GraphQL/Model/QueryTypeEvent.php +++ b/src/Event/GraphQL/Model/QueryTypeEvent.php @@ -48,41 +48,26 @@ public function getQueryType() return $this->queryType; } - /** - * @param QueryType $queryType - */ public function setQueryType(QueryType $queryType) { $this->queryType = $queryType; } - /** - * @return array - */ public function getConfig(): array { return $this->config; } - /** - * @param array $config - */ public function setConfig(array $config): void { $this->config = $config; } - /** - * @return array - */ public function getContext(): array { return $this->context; } - /** - * @param array $context - */ public function setContext(array $context): void { $this->context = $context; diff --git a/src/EventListener/DataChangeListener.php b/src/EventListener/DataChangeListener.php index a1c4012a..a1277ea0 100644 --- a/src/EventListener/DataChangeListener.php +++ b/src/EventListener/DataChangeListener.php @@ -146,7 +146,6 @@ protected function checkConfiguration($dataType, $modificationType, $searchValue return; } - /** @var Configuration $configurationEntity */ foreach ($configList as $configurationEntity) { try { $entity = WorkspaceHelper::modifyWorkspaceRowByType($configurationEntity, $dataType, $modificationType, $searchValue, $replaceValue); diff --git a/src/GraphQL/AssetType/AssetType.php b/src/GraphQL/AssetType/AssetType.php index 735b7b9f..de945fc6 100644 --- a/src/GraphQL/AssetType/AssetType.php +++ b/src/GraphQL/AssetType/AssetType.php @@ -191,17 +191,11 @@ public function build(&$config) ]; } - /** - * @return string - */ public function getFieldname(): string { return $this->fieldname; } - /** - * @param string $fieldname - */ public function setFieldname(string $fieldname): void { $this->fieldname = $fieldname; diff --git a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Base.php b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Base.php index cf167d52..c34a88ea 100644 --- a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Base.php +++ b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Base.php @@ -23,9 +23,6 @@ abstract class Base { use ServiceTrait; - /** - * @param Service $graphQlService - */ public function __construct(Service $graphQlService) { $this->setGraphQLService($graphQlService); diff --git a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/CalculatedValue.php b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/CalculatedValue.php index 19f1720b..45d8522e 100644 --- a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/CalculatedValue.php +++ b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/CalculatedValue.php @@ -20,7 +20,7 @@ class CalculatedValue extends Base { /** - * @return \GraphQL\Type\Definition\StringType|StringType + * @return StringType */ public function getFieldType() { diff --git a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Country.php b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Country.php index abbbbc47..793c7a72 100644 --- a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Country.php +++ b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Country.php @@ -20,7 +20,7 @@ class Country extends Base { /** - * @return \GraphQL\Type\Definition\StringType|StringType + * @return StringType */ public function getFieldType() { diff --git a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Countrymultiselect.php b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Countrymultiselect.php index 55b83a67..ef2ece30 100644 --- a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Countrymultiselect.php +++ b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Countrymultiselect.php @@ -20,7 +20,7 @@ class Countrymultiselect extends Base { /** - * @return \GraphQL\Type\Definition\StringType|MultiselectType + * @return MultiselectType * * @throws \Exception */ diff --git a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Date.php b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Date.php index 701c7839..b78d768c 100644 --- a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Date.php +++ b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Date.php @@ -20,7 +20,7 @@ class Date extends Base { /** - * @return \GraphQL\Type\Definition\StringType|DateType + * @return DateType|null */ public function getFieldType() { diff --git a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Datetime.php b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Datetime.php index 115dae51..8cb22210 100644 --- a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Datetime.php +++ b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Datetime.php @@ -20,7 +20,7 @@ class Datetime extends Base { /** - * @return \GraphQL\Type\Definition\StringType|StringType + * @return StringType */ public function getFieldType() { diff --git a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Input.php b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Input.php index dbeab794..4ceb935c 100644 --- a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Input.php +++ b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Input.php @@ -20,7 +20,7 @@ class Input extends Base { /** - * @return \GraphQL\Type\Definition\StringType|StringType + * @return StringType */ public function getFieldType() { diff --git a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/InputQuantityValue.php b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/InputQuantityValue.php index 0d7aa78b..9899381c 100644 --- a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/InputQuantityValue.php +++ b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/InputQuantityValue.php @@ -19,6 +19,11 @@ class InputQuantityValue extends Base { + /** + * @return mixed + * + * @throws \Exception + */ public function getFieldType() { return QuantityValueType::getInstance($this->getGraphQlService(), 'csFeatureInputQuantityValue', 'input_quantity_value', 'inputquantityvalue'); diff --git a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Language.php b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Language.php index c708f978..463d3646 100644 --- a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Language.php +++ b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Language.php @@ -20,7 +20,7 @@ class Language extends Base { /** - * @return \GraphQL\Type\Definition\StringType|StringType + * @return StringType */ public function getFieldType() { diff --git a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Languagemultiselect.php b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Languagemultiselect.php index b4bc28d3..6c027612 100644 --- a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Languagemultiselect.php +++ b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Languagemultiselect.php @@ -20,7 +20,7 @@ class Languagemultiselect extends Base { /** - * @return \GraphQL\Type\Definition\StringType|MultiselectType + * @return MultiselectType * * @throws \Exception */ diff --git a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Multiselect.php b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Multiselect.php index 6864f839..a770510f 100644 --- a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Multiselect.php +++ b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Multiselect.php @@ -20,7 +20,7 @@ class Multiselect extends Base { /** - * @return \GraphQL\Type\Definition\StringType|MultiselectType + * @return MultiselectType * * @throws \Exception */ diff --git a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Numeric.php b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Numeric.php index 50fab924..2d48ad77 100644 --- a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Numeric.php +++ b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Numeric.php @@ -20,7 +20,7 @@ class Numeric extends Base { /** - * @return \GraphQL\Type\Definition\StringType|StringType + * @return StringType */ public function getFieldType() { diff --git a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/QuantityValue.php b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/QuantityValue.php index 8cb49493..03430b35 100644 --- a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/QuantityValue.php +++ b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/QuantityValue.php @@ -19,6 +19,11 @@ class QuantityValue extends Base { + /** + * @return mixed + * + * @throws \Exception + */ public function getFieldType() { return QuantityValueType::getInstance($this->getGraphQlService(), 'csFeatureQuantityValue', 'quantity_value', 'quantityvalue'); diff --git a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/RgbaColor.php b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/RgbaColor.php index caa8e278..c3e15bcc 100644 --- a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/RgbaColor.php +++ b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/RgbaColor.php @@ -20,7 +20,7 @@ class RgbaColor extends Base { /** - * @return \GraphQL\Type\Definition\StringType|StringType + * @return StringType */ public function getFieldType() { diff --git a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Select.php b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Select.php index f0bf4cca..1134e7d6 100644 --- a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Select.php +++ b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Select.php @@ -20,7 +20,7 @@ class Select extends Base { /** - * @return \GraphQL\Type\Definition\StringType|StringType + * @return StringType */ public function getFieldType() { diff --git a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Slider.php b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Slider.php index 92792302..e5de5f55 100644 --- a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Slider.php +++ b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Slider.php @@ -20,7 +20,7 @@ class Slider extends Base { /** - * @return \GraphQL\Type\Definition\StringType|StringType + * @return StringType */ public function getFieldType() { diff --git a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Textarea.php b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Textarea.php index a48e3b0d..a7887112 100644 --- a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Textarea.php +++ b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Textarea.php @@ -20,7 +20,7 @@ class Textarea extends Base { /** - * @return \GraphQL\Type\Definition\StringType|StringType + * @return StringType */ public function getFieldType() { diff --git a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Time.php b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Time.php index a435bdd2..a48a67f7 100644 --- a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Time.php +++ b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Time.php @@ -20,7 +20,7 @@ class Time extends Base { /** - * @return \GraphQL\Type\Definition\StringType|StringType + * @return StringType */ public function getFieldType() { diff --git a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Wysiwyg.php b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Wysiwyg.php index 2213deac..ef7cd03d 100644 --- a/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Wysiwyg.php +++ b/src/GraphQL/ClassificationstoreFeatureQueryTypeGenerator/Wysiwyg.php @@ -20,7 +20,7 @@ class Wysiwyg extends Base { /** - * @return \GraphQL\Type\Definition\StringType|StringType + * @return StringType */ public function getFieldType() { diff --git a/src/GraphQL/ClassificationstoreFeatureType/MultiselectType.php b/src/GraphQL/ClassificationstoreFeatureType/MultiselectType.php index ac1808bb..5e7301b8 100644 --- a/src/GraphQL/ClassificationstoreFeatureType/MultiselectType.php +++ b/src/GraphQL/ClassificationstoreFeatureType/MultiselectType.php @@ -29,10 +29,10 @@ class MultiselectType extends ObjectType /** * @param Service $service * @param string $name + * @param string $fieldname * * @return MultiselectType * - * @throws \Exception */ public static function getInstance(Service $service, string $name, $fieldname = 'selections') { diff --git a/src/GraphQL/ClassificationstoreFeatureType/QuantityValueType.php b/src/GraphQL/ClassificationstoreFeatureType/QuantityValueType.php index ac60a138..82828642 100644 --- a/src/GraphQL/ClassificationstoreFeatureType/QuantityValueType.php +++ b/src/GraphQL/ClassificationstoreFeatureType/QuantityValueType.php @@ -29,6 +29,7 @@ class QuantityValueType extends ObjectType * @param Service $service * @param string $name * @param string $innerType + * @param string $fieldname * * @return mixed * diff --git a/src/GraphQL/ClassificationstoreFeatureType/StringType.php b/src/GraphQL/ClassificationstoreFeatureType/StringType.php index d81d00bb..ffca7909 100644 --- a/src/GraphQL/ClassificationstoreFeatureType/StringType.php +++ b/src/GraphQL/ClassificationstoreFeatureType/StringType.php @@ -27,6 +27,7 @@ class StringType extends ObjectType /** * @param string $name + * @param string $valueField * * @return StringType */ diff --git a/src/GraphQL/ClassificationstoreType/Group.php b/src/GraphQL/ClassificationstoreType/Group.php index 28f6f11a..7abf94a3 100644 --- a/src/GraphQL/ClassificationstoreType/Group.php +++ b/src/GraphQL/ClassificationstoreType/Group.php @@ -80,7 +80,6 @@ public function build(&$config) $service = $this->getGraphQlService(); $supportedFeatureTypeNames = $service->getSupportedCsFeatureQueryDataTypes(); - /** @var Classificationstore\KeyGroupRelation $keyRelation */ foreach ($keyRelations as $keyRelation) { $keyDataType = $keyRelation->getType(); if (in_array($keyDataType, $supportedFeatureTypeNames)) { diff --git a/src/GraphQL/DataObjectInputProcessor/AdvancedManyToManyObjectRelation.php b/src/GraphQL/DataObjectInputProcessor/AdvancedManyToManyObjectRelation.php index 3391555d..e4d969c8 100644 --- a/src/GraphQL/DataObjectInputProcessor/AdvancedManyToManyObjectRelation.php +++ b/src/GraphQL/DataObjectInputProcessor/AdvancedManyToManyObjectRelation.php @@ -28,7 +28,7 @@ class AdvancedManyToManyObjectRelation extends Base /** * @param Concrete|AbstractData $object - * @param mixed $newValue + * @param array $newValue * @param array $args * @param array $context * @param ResolveInfo $info diff --git a/src/GraphQL/DataObjectInputProcessor/AdvancedManyToManyRelation.php b/src/GraphQL/DataObjectInputProcessor/AdvancedManyToManyRelation.php index 5e9090a6..4ec5da0c 100644 --- a/src/GraphQL/DataObjectInputProcessor/AdvancedManyToManyRelation.php +++ b/src/GraphQL/DataObjectInputProcessor/AdvancedManyToManyRelation.php @@ -28,7 +28,7 @@ class AdvancedManyToManyRelation extends Base /** * @param Concrete|AbstractData $object - * @param mixed $newValue + * @param array $newValue * @param array $args * @param array $context * @param ResolveInfo $info diff --git a/src/GraphQL/DataObjectInputProcessor/BaseOperator.php b/src/GraphQL/DataObjectInputProcessor/BaseOperator.php index f3961f93..bb19b6a7 100644 --- a/src/GraphQL/DataObjectInputProcessor/BaseOperator.php +++ b/src/GraphQL/DataObjectInputProcessor/BaseOperator.php @@ -31,7 +31,7 @@ public function __construct($nodeDef) /** * @param Concrete|AbstractData $object - * @param mixed $newValue + * @param array $newValue * @param array $args * @param array $context * @param ResolveInfo $info diff --git a/src/GraphQL/DataObjectInputProcessor/Date.php b/src/GraphQL/DataObjectInputProcessor/Date.php index 909ef553..e86d2426 100644 --- a/src/GraphQL/DataObjectInputProcessor/Date.php +++ b/src/GraphQL/DataObjectInputProcessor/Date.php @@ -25,7 +25,7 @@ class Date extends Base { /** * @param Concrete|AbstractData $object - * @param mixed $newValue + * @param int|string $newValue * @param array $args * @param array $context * @param ResolveInfo $info diff --git a/src/GraphQL/DataObjectInputProcessor/ExternalImage.php b/src/GraphQL/DataObjectInputProcessor/ExternalImage.php index ab72cbb2..4676017e 100644 --- a/src/GraphQL/DataObjectInputProcessor/ExternalImage.php +++ b/src/GraphQL/DataObjectInputProcessor/ExternalImage.php @@ -24,7 +24,7 @@ class ExternalImage extends Base { /** * @param Concrete|AbstractData $object - * @param mixed $newValue + * @param string $newValue * @param array $args * @param array $context * @param ResolveInfo $info diff --git a/src/GraphQL/DataObjectInputProcessor/Fieldcollections.php b/src/GraphQL/DataObjectInputProcessor/Fieldcollections.php index 54776752..cf12bc43 100644 --- a/src/GraphQL/DataObjectInputProcessor/Fieldcollections.php +++ b/src/GraphQL/DataObjectInputProcessor/Fieldcollections.php @@ -27,10 +27,6 @@ class Fieldcollections extends Base */ protected $processors; - /** - * @param array $nodeDef - * @param array $processors - */ public function __construct(array $nodeDef, array $processors) { parent::__construct($nodeDef); @@ -39,7 +35,7 @@ public function __construct(array $nodeDef, array $processors) /** * @param Concrete|AbstractData $object - * @param mixed $newValue + * @param array $newValue * @param array $args * @param array $context * @param ResolveInfo $info diff --git a/src/GraphQL/DataObjectInputProcessor/Geopoint.php b/src/GraphQL/DataObjectInputProcessor/Geopoint.php index 7c4e3878..ea2ed847 100644 --- a/src/GraphQL/DataObjectInputProcessor/Geopoint.php +++ b/src/GraphQL/DataObjectInputProcessor/Geopoint.php @@ -24,7 +24,7 @@ class Geopoint extends Base { /** * @param Concrete|AbstractData $object - * @param mixed $newValue + * @param array $newValue * @param array $args * @param array $context * @param ResolveInfo $info diff --git a/src/GraphQL/DataObjectInputProcessor/IfEmptyOperator.php b/src/GraphQL/DataObjectInputProcessor/IfEmptyOperator.php index 5447d905..61f2cd27 100644 --- a/src/GraphQL/DataObjectInputProcessor/IfEmptyOperator.php +++ b/src/GraphQL/DataObjectInputProcessor/IfEmptyOperator.php @@ -32,7 +32,7 @@ public function __construct($nodeDef) /** * @param Concrete|AbstractData $object - * @param mixed $newValue + * @param array $newValue * @param array $args * @param array $context * @param ResolveInfo $info diff --git a/src/GraphQL/DataObjectInputProcessor/Image.php b/src/GraphQL/DataObjectInputProcessor/Image.php index 090607a6..1426e9a4 100644 --- a/src/GraphQL/DataObjectInputProcessor/Image.php +++ b/src/GraphQL/DataObjectInputProcessor/Image.php @@ -27,11 +27,13 @@ class Image extends Base { /** * @param Concrete|AbstractData $object - * @param mixed $newValue + * @param array $newValue * @param array $args * @param array $context * @param ResolveInfo $info * + * @return void|null + * * @throws \Exception */ public function process($object, $newValue, $args, $context, ResolveInfo $info) diff --git a/src/GraphQL/DataObjectInputProcessor/LocaleCollectorOperator.php b/src/GraphQL/DataObjectInputProcessor/LocaleCollectorOperator.php index 6d81beb4..5c45b6fb 100644 --- a/src/GraphQL/DataObjectInputProcessor/LocaleCollectorOperator.php +++ b/src/GraphQL/DataObjectInputProcessor/LocaleCollectorOperator.php @@ -23,7 +23,7 @@ class LocaleCollectorOperator extends BaseOperator { /** * @param Concrete|AbstractData $object - * @param mixed $newValue + * @param array $newValue * @param array $args * @param array $context * @param ResolveInfo $info diff --git a/src/GraphQL/DataObjectInputProcessor/LocaleSwitcherOperator.php b/src/GraphQL/DataObjectInputProcessor/LocaleSwitcherOperator.php index cfb04fdf..8b986d23 100644 --- a/src/GraphQL/DataObjectInputProcessor/LocaleSwitcherOperator.php +++ b/src/GraphQL/DataObjectInputProcessor/LocaleSwitcherOperator.php @@ -34,7 +34,7 @@ public function __construct($nodeDef) /** * @param Concrete|AbstractData $object - * @param mixed $newValue + * @param array $newValue * @param array $args * @param array $context * @param ResolveInfo $info diff --git a/src/GraphQL/DataObjectInputProcessor/ManyToManyObjectRelation.php b/src/GraphQL/DataObjectInputProcessor/ManyToManyObjectRelation.php index 31cee2d0..3d3b3dc6 100644 --- a/src/GraphQL/DataObjectInputProcessor/ManyToManyObjectRelation.php +++ b/src/GraphQL/DataObjectInputProcessor/ManyToManyObjectRelation.php @@ -28,7 +28,7 @@ class ManyToManyObjectRelation extends Base /** * @param Concrete|AbstractData $object - * @param mixed $newValue + * @param array $newValue * @param array $args * @param array $context * @param ResolveInfo $info diff --git a/src/GraphQL/DataObjectInputProcessor/ManyToManyRelation.php b/src/GraphQL/DataObjectInputProcessor/ManyToManyRelation.php index 178c3e44..2826ba76 100644 --- a/src/GraphQL/DataObjectInputProcessor/ManyToManyRelation.php +++ b/src/GraphQL/DataObjectInputProcessor/ManyToManyRelation.php @@ -27,7 +27,7 @@ class ManyToManyRelation extends Base /** * @param Concrete|AbstractData $object - * @param mixed $newValue + * @param array $newValue * @param array $args * @param array $context * @param ResolveInfo $info diff --git a/src/GraphQL/DataObjectInputProcessor/ManyToOneRelation.php b/src/GraphQL/DataObjectInputProcessor/ManyToOneRelation.php index 82f6ae9f..a722cdbb 100644 --- a/src/GraphQL/DataObjectInputProcessor/ManyToOneRelation.php +++ b/src/GraphQL/DataObjectInputProcessor/ManyToOneRelation.php @@ -27,7 +27,7 @@ class ManyToOneRelation extends Base /** * @param Concrete|AbstractData $object - * @param mixed $newValue + * @param array $newValue * @param array $args * @param array $context * @param ResolveInfo $info diff --git a/src/GraphQL/DataObjectInputProcessor/QuantityValue.php b/src/GraphQL/DataObjectInputProcessor/QuantityValue.php index cfb68f00..4a534826 100644 --- a/src/GraphQL/DataObjectInputProcessor/QuantityValue.php +++ b/src/GraphQL/DataObjectInputProcessor/QuantityValue.php @@ -24,7 +24,7 @@ class QuantityValue extends Base { /** * @param Concrete|AbstractData $object - * @param mixed $newValue + * @param array $newValue * @param array $args * @param array $context * @param ResolveInfo $info diff --git a/src/GraphQL/DataObjectMutationFieldConfigGenerator/AdvancedManyToManyObjectRelation.php b/src/GraphQL/DataObjectMutationFieldConfigGenerator/AdvancedManyToManyObjectRelation.php index e9be48cf..b0d1cb09 100644 --- a/src/GraphQL/DataObjectMutationFieldConfigGenerator/AdvancedManyToManyObjectRelation.php +++ b/src/GraphQL/DataObjectMutationFieldConfigGenerator/AdvancedManyToManyObjectRelation.php @@ -24,10 +24,6 @@ class AdvancedManyToManyObjectRelation extends Base protected $elementInputType; protected $fieldDefinition; - /** - * @param Service $graphQlService - * @param ElementDescriptorInputType $elementInputType - */ public function __construct(Service $graphQlService, ElementDescriptorInputType $elementInputType) { $this->elementInputType = $elementInputType; diff --git a/src/GraphQL/DataObjectMutationFieldConfigGenerator/AdvancedManyToManyRelation.php b/src/GraphQL/DataObjectMutationFieldConfigGenerator/AdvancedManyToManyRelation.php index c5594083..ab34f458 100644 --- a/src/GraphQL/DataObjectMutationFieldConfigGenerator/AdvancedManyToManyRelation.php +++ b/src/GraphQL/DataObjectMutationFieldConfigGenerator/AdvancedManyToManyRelation.php @@ -24,10 +24,6 @@ class AdvancedManyToManyRelation extends Base protected $elementInputType; protected $fieldDefinition; - /** - * @param Service $graphQlService - * @param ElementDescriptorInputType $elementInputType - */ public function __construct(Service $graphQlService, ElementDescriptorInputType $elementInputType) { $this->elementInputType = $elementInputType; diff --git a/src/GraphQL/DataObjectMutationFieldConfigGenerator/Base.php b/src/GraphQL/DataObjectMutationFieldConfigGenerator/Base.php index b5f5a064..e2fe9d40 100644 --- a/src/GraphQL/DataObjectMutationFieldConfigGenerator/Base.php +++ b/src/GraphQL/DataObjectMutationFieldConfigGenerator/Base.php @@ -25,9 +25,6 @@ class Base implements DataObjectMutationFieldConfigGeneratorInterface { use ServiceTrait; - /** - * @param Service $graphQlService - */ public function __construct(Service $graphQlService) { $this->setGraphQLService($graphQlService); diff --git a/src/GraphQL/DataObjectMutationFieldConfigGenerator/ManyToManyObjectRelation.php b/src/GraphQL/DataObjectMutationFieldConfigGenerator/ManyToManyObjectRelation.php index fa63a224..7437ba47 100644 --- a/src/GraphQL/DataObjectMutationFieldConfigGenerator/ManyToManyObjectRelation.php +++ b/src/GraphQL/DataObjectMutationFieldConfigGenerator/ManyToManyObjectRelation.php @@ -23,10 +23,6 @@ class ManyToManyObjectRelation extends Base { protected $elementInputType; - /** - * @param Service $graphQlService - * @param ElementDescriptorInputType $elementInputType - */ public function __construct(Service $graphQlService, ElementDescriptorInputType $elementInputType) { $this->elementInputType = $elementInputType; diff --git a/src/GraphQL/DataObjectMutationFieldConfigGenerator/ManyToManyRelation.php b/src/GraphQL/DataObjectMutationFieldConfigGenerator/ManyToManyRelation.php index 6d97b6ef..b8cc6c4d 100644 --- a/src/GraphQL/DataObjectMutationFieldConfigGenerator/ManyToManyRelation.php +++ b/src/GraphQL/DataObjectMutationFieldConfigGenerator/ManyToManyRelation.php @@ -23,10 +23,6 @@ class ManyToManyRelation extends Base { protected $elementInputType; - /** - * @param Service $graphQlService - * @param ElementDescriptorInputType $elementInputType - */ public function __construct(Service $graphQlService, ElementDescriptorInputType $elementInputType) { $this->elementInputType = $elementInputType; diff --git a/src/GraphQL/DataObjectMutationOperatorConfigGenerator/Base.php b/src/GraphQL/DataObjectMutationOperatorConfigGenerator/Base.php index da2da8f1..4e2de408 100644 --- a/src/GraphQL/DataObjectMutationOperatorConfigGenerator/Base.php +++ b/src/GraphQL/DataObjectMutationOperatorConfigGenerator/Base.php @@ -23,9 +23,6 @@ abstract class Base { use ServiceTrait; - /** - * @param Service $graphQlService - */ public function __construct(Service $graphQlService) { $this->graphQlService = $graphQlService; diff --git a/src/GraphQL/DataObjectMutationOperatorConfigGenerator/IfEmpty.php b/src/GraphQL/DataObjectMutationOperatorConfigGenerator/IfEmpty.php index 64b983ae..853fa17e 100644 --- a/src/GraphQL/DataObjectMutationOperatorConfigGenerator/IfEmpty.php +++ b/src/GraphQL/DataObjectMutationOperatorConfigGenerator/IfEmpty.php @@ -20,11 +20,11 @@ class IfEmpty extends Base { /** - * @param mixed $nodeDef + * @param array $nodeDef * @param ClassDefinition|null $class * @param object|null $container * - * @return mixed + * @return array */ public function getGraphQlMutationOperatorConfig($nodeDef, $class = null, $container = null, $params = []) { diff --git a/src/GraphQL/DataObjectMutationOperatorConfigGenerator/LocaleCollector.php b/src/GraphQL/DataObjectMutationOperatorConfigGenerator/LocaleCollector.php index 7805812f..aac0e05c 100644 --- a/src/GraphQL/DataObjectMutationOperatorConfigGenerator/LocaleCollector.php +++ b/src/GraphQL/DataObjectMutationOperatorConfigGenerator/LocaleCollector.php @@ -21,12 +21,12 @@ class LocaleCollector extends Base { /** - * @param mixed $nodeDef + * @param array $nodeDef * @param \Pimcore\Model\DataObject\ClassDefinition|null $class * @param object|null $container * @param array $params * - * @return mixed + * @return array */ public function getGraphQlMutationOperatorConfig($nodeDef, $class = null, $container = null, $params = []) { diff --git a/src/GraphQL/DataObjectMutationOperatorConfigGenerator/LocaleSwitcher.php b/src/GraphQL/DataObjectMutationOperatorConfigGenerator/LocaleSwitcher.php index e80ed59b..b96a0337 100644 --- a/src/GraphQL/DataObjectMutationOperatorConfigGenerator/LocaleSwitcher.php +++ b/src/GraphQL/DataObjectMutationOperatorConfigGenerator/LocaleSwitcher.php @@ -20,11 +20,11 @@ class LocaleSwitcher extends Base { /** - * @param mixed $nodeDef + * @param array $nodeDef * @param ClassDefinition|null $class * @param object|null $container * - * @return mixed + * @return array */ public function getGraphQlMutationOperatorConfig($nodeDef, $class = null, $container = null, $params = []) { diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/AbstractTable.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/AbstractTable.php index 266c28c0..597287dc 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/AbstractTable.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/AbstractTable.php @@ -33,7 +33,7 @@ abstract class AbstractTable extends Base * @param ClassDefinition|null $class * @param object|null $container * - * @return mixed + * @return array */ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class = null, $container = null) { @@ -105,10 +105,5 @@ public function getFieldType(Data $fieldDefinition, $class = null, $container = return Type::listOf($type); } - /** - * @param Data $fieldDefinition - * - * @return array - */ abstract protected function getTableColumns(Data $fieldDefinition): array; } diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/AssetBase.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/AssetBase.php index bc18851a..e47c3d8c 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/AssetBase.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/AssetBase.php @@ -26,7 +26,7 @@ class AssetBase extends Base * @param ClassDefinition|null $class * @param object|null $container * - * @return mixed + * @return array * * @throws \Exception */ @@ -50,7 +50,7 @@ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class * @param ClassDefinition|null $class * @param object|null $container * - * @return \GraphQL\Type\Definition\ListOfType|mixed + * @return mixed * * @throws \Exception */ @@ -59,6 +59,13 @@ public function getFieldType(Data $fieldDefinition, $class = null, $container = return $this->getGraphQlService()->buildAssetType('asset'); } + /** + * @param string $attribute + * @param Data $fieldDefinition + * @param ClassDefinition $class + * + * @return array + */ public function getResolver($attribute, $fieldDefinition, $class) { $resolver = new Helper\AssetBase($this->getGraphQlService(), $attribute, $fieldDefinition, $class); diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Base.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Base.php index c03131bb..42bee9f6 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Base.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Base.php @@ -27,9 +27,6 @@ class Base implements DataObjectQueryFieldConfigGeneratorInterface, TypeDefiniti { use ServiceTrait; - /** - * @param Service $graphQlService - */ public function __construct(Service $graphQlService) { $this->setGraphQLService($graphQlService); @@ -41,7 +38,7 @@ public function __construct(Service $graphQlService) * @param ClassDefinition|null $class * @param object|null $container * - * @return mixed + * @return array */ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class = null, $container = null) { @@ -58,7 +55,7 @@ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class * @param array $grapQLConfig * @param object|null $container * - * @return mixed + * @return array */ public function enrichConfig($fieldDefinition, $class, $attribute, $grapQLConfig, $container = null) { @@ -90,6 +87,13 @@ public function getFieldType(Data $fieldDefinition, $class = null, $container = return Type::string(); } + /** + * @param string $attribute + * @param Data $fieldDefinition + * @param ClassDefinition $class + * + * @return array|callable(mixed $value, array $args, array $context, \GraphQL\Type\Definition\ResolveInfo $info): mixed + */ public function getResolver($attribute, $fieldDefinition, $class) { $resolver = new Helper\Base($this->getGraphQlService(), $attribute, $fieldDefinition, $class); diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Block.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Block.php index fc7d7aeb..625b7f42 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Block.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Block.php @@ -35,7 +35,7 @@ class Block extends Base * @param ClassDefinition|null $class * @param object|null $container * - * @return mixed + * @return array */ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class = null, $container = null) { @@ -51,13 +51,20 @@ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class * @param ClassDefinition|null $class * @param object|null $container * - * @return \GraphQL\Type\Definition\ListOfType|mixed + * @return \GraphQL\Type\Definition\ListOfType */ public function getFieldType(Data $fieldDefinition, $class = null, $container = null) { return Type::listOf(new BlockEntryType($this->getGraphQlService(), $fieldDefinition, $class, [])); } + /** + * @param string $attribute + * @param Data $fieldDefinition + * @param ClassDefinition $class + * + * @return \Closure + */ public function getResolver($attribute, $fieldDefinition, $class) { return function ($value = null, $args = [], $context = [], ResolveInfo $resolveInfo = null) use ( diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/CalculatedValue.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/CalculatedValue.php index cf8573b7..67c33ace 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/CalculatedValue.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/CalculatedValue.php @@ -31,7 +31,7 @@ class CalculatedValue extends Base * @param ClassDefinition|null $class * @param object|null $container * - * @return mixed + * @return array */ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class = null, $container = null) { diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Checkbox.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Checkbox.php index ee32326c..c8f3c555 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Checkbox.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Checkbox.php @@ -27,7 +27,7 @@ class Checkbox extends Base * @param ClassDefinition|null $class * @param object|null $container * - * @return mixed + * @return array */ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class = null, $container = null) { @@ -42,7 +42,7 @@ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class * @param ClassDefinition|null $class * @param object|null $container * - * @return \GraphQL\Type\Definition\ListOfType|mixed + * @return \GraphQL\Type\Definition\ScalarType */ public function getFieldType(Data $fieldDefinition, $class = null, $container = null) { diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Classificationstore.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Classificationstore.php index 66dfb668..05c45011 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Classificationstore.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Classificationstore.php @@ -30,7 +30,7 @@ class Classificationstore extends Base * @param ClassDefinition|null $class * @param object|null $container * - * @return mixed + * @return array */ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class = null, $container = null) { diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Geobounds.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Geobounds.php index 9768b05a..e80312aa 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Geobounds.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Geobounds.php @@ -27,7 +27,7 @@ class Geobounds extends Base * @param ClassDefinition|null $class * @param object|null $container * - * @return mixed + * @return array */ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class = null, $container = null) { diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Geopoint.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Geopoint.php index ecec1d72..726a51b6 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Geopoint.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Geopoint.php @@ -27,7 +27,7 @@ class Geopoint extends Base * @param ClassDefinition|null $class * @param object|null $container * - * @return mixed + * @return array */ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class = null, $container = null) { diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Geopolygon.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Geopolygon.php index 229be3ba..d2b774c5 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Geopolygon.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Geopolygon.php @@ -29,7 +29,7 @@ class Geopolygon extends Base * @param ClassDefinition|null $class * @param object|null $container * - * @return mixed + * @return array */ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class = null, $container = null) { diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/AssetBase.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/AssetBase.php index afb656b9..07f85fa3 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/AssetBase.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/AssetBase.php @@ -16,6 +16,7 @@ namespace Pimcore\Bundle\DataHubBundle\GraphQL\DataObjectQueryFieldConfigGenerator\Helper; use GraphQL\Type\Definition\ResolveInfo; +use Pimcore\Bundle\DataHubBundle\GraphQL\BaseDescriptor; use Pimcore\Bundle\DataHubBundle\GraphQL\ElementDescriptor; use Pimcore\Bundle\DataHubBundle\GraphQL\Service; use Pimcore\Bundle\DataHubBundle\GraphQL\Traits\ServiceTrait; @@ -57,7 +58,7 @@ public function __construct(Service $graphQlService, $attribute, $fieldDefinitio } /** - * @param mixed $value + * @param BaseDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/Base.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/Base.php index 60b162a4..ffaf51dc 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/Base.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/Base.php @@ -16,6 +16,7 @@ namespace Pimcore\Bundle\DataHubBundle\GraphQL\DataObjectQueryFieldConfigGenerator\Helper; use GraphQL\Type\Definition\ResolveInfo; +use Pimcore\Bundle\DataHubBundle\GraphQL\BaseDescriptor; use Pimcore\Bundle\DataHubBundle\GraphQL\Service; use Pimcore\Bundle\DataHubBundle\GraphQL\Traits\ServiceTrait; use Pimcore\Model\DataObject\ClassDefinition; @@ -55,7 +56,7 @@ public function __construct(Service $graphQlService, $attribute, $fieldDefinitio } /** - * @param mixed $value + * @param BaseDescriptor $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/Hotspotimage.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/Hotspotimage.php index 4e701322..c788e478 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/Hotspotimage.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/Hotspotimage.php @@ -17,6 +17,7 @@ namespace Pimcore\Bundle\DataHubBundle\GraphQL\DataObjectQueryFieldConfigGenerator\Helper; use GraphQL\Type\Definition\ResolveInfo; +use Pimcore\Bundle\DataHubBundle\GraphQL\BaseDescriptor; use Pimcore\Bundle\DataHubBundle\GraphQL\ElementDescriptor; use Pimcore\Bundle\DataHubBundle\GraphQL\Service; use Pimcore\Bundle\DataHubBundle\GraphQL\Traits\ServiceTrait; @@ -68,7 +69,7 @@ public function __construct( } /** - * @param mixed $value + * @param BaseDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/Image.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/Image.php index 8c9a1984..409e3ee3 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/Image.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/Image.php @@ -16,6 +16,7 @@ namespace Pimcore\Bundle\DataHubBundle\GraphQL\DataObjectQueryFieldConfigGenerator\Helper; use GraphQL\Type\Definition\ResolveInfo; +use Pimcore\Bundle\DataHubBundle\GraphQL\BaseDescriptor; use Pimcore\Bundle\DataHubBundle\GraphQL\ElementDescriptor; use Pimcore\Bundle\DataHubBundle\GraphQL\Traits\ServiceTrait; use Pimcore\Bundle\DataHubBundle\WorkspaceHelper; @@ -58,7 +59,7 @@ public function __construct(\Pimcore\Bundle\DataHubBundle\GraphQL\Service $graph } /** - * @param mixed $value + * @param BaseDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/ImageGallery.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/ImageGallery.php index b3c371f4..3678ab4e 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/ImageGallery.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/ImageGallery.php @@ -17,6 +17,7 @@ namespace Pimcore\Bundle\DataHubBundle\GraphQL\DataObjectQueryFieldConfigGenerator\Helper; use GraphQL\Type\Definition\ResolveInfo; +use Pimcore\Bundle\DataHubBundle\GraphQL\BaseDescriptor; use Pimcore\Bundle\DataHubBundle\GraphQL\ElementDescriptor; use Pimcore\Bundle\DataHubBundle\GraphQL\Service as GraphQlService; use Pimcore\Bundle\DataHubBundle\GraphQL\Traits\ServiceTrait; @@ -70,7 +71,7 @@ public function __construct( } /** - * @param mixed $value + * @param BaseDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/Multihref.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/Multihref.php index 1224bb0f..32aec412 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/Multihref.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/Multihref.php @@ -16,6 +16,7 @@ namespace Pimcore\Bundle\DataHubBundle\GraphQL\DataObjectQueryFieldConfigGenerator\Helper; use GraphQL\Type\Definition\ResolveInfo; +use Pimcore\Bundle\DataHubBundle\GraphQL\BaseDescriptor; use Pimcore\Bundle\DataHubBundle\GraphQL\ElementDescriptor; use Pimcore\Bundle\DataHubBundle\GraphQL\Service; use Pimcore\Bundle\DataHubBundle\GraphQL\Traits\ServiceTrait; @@ -57,7 +58,7 @@ public function __construct(Service $graphQlService, $attribute, $fieldDefinitio } /** - * @param mixed $value + * @param BaseDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/MultihrefMetadata.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/MultihrefMetadata.php index 15fd1b1b..590a0a54 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/MultihrefMetadata.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/MultihrefMetadata.php @@ -16,6 +16,7 @@ namespace Pimcore\Bundle\DataHubBundle\GraphQL\DataObjectQueryFieldConfigGenerator\Helper; use GraphQL\Type\Definition\ResolveInfo; +use Pimcore\Bundle\DataHubBundle\GraphQL\BaseDescriptor; use Pimcore\Bundle\DataHubBundle\GraphQL\ElementDescriptor; use Pimcore\Bundle\DataHubBundle\GraphQL\Service; use Pimcore\Bundle\DataHubBundle\GraphQL\Traits\ServiceTrait; @@ -58,7 +59,7 @@ public function __construct(Service $graphQlService, $attribute, $fieldDefinitio } /** - * @param mixed $value + * @param BaseDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/ObjectsMetadata.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/ObjectsMetadata.php index 58dcf109..1ac5b36b 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/ObjectsMetadata.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/ObjectsMetadata.php @@ -16,6 +16,7 @@ namespace Pimcore\Bundle\DataHubBundle\GraphQL\DataObjectQueryFieldConfigGenerator\Helper; use GraphQL\Type\Definition\ResolveInfo; +use Pimcore\Bundle\DataHubBundle\GraphQL\BaseDescriptor; use Pimcore\Bundle\DataHubBundle\GraphQL\ElementDescriptor; use Pimcore\Bundle\DataHubBundle\GraphQL\Service; use Pimcore\Bundle\DataHubBundle\GraphQL\Traits\ServiceTrait; @@ -57,7 +58,7 @@ public function __construct(Service $graphQlService, $attribute, $fieldDefinitio } /** - * @param mixed $value + * @param BaseDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/ReverseManyToManyObjects.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/ReverseManyToManyObjects.php index 3828648f..139ddb06 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/ReverseManyToManyObjects.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Helper/ReverseManyToManyObjects.php @@ -16,6 +16,7 @@ namespace Pimcore\Bundle\DataHubBundle\GraphQL\DataObjectQueryFieldConfigGenerator\Helper; use GraphQL\Type\Definition\ResolveInfo; +use Pimcore\Bundle\DataHubBundle\GraphQL\BaseDescriptor; use Pimcore\Bundle\DataHubBundle\GraphQL\ElementDescriptor; use Pimcore\Bundle\DataHubBundle\GraphQL\Service; use Pimcore\Bundle\DataHubBundle\GraphQL\Traits\ServiceTrait; @@ -58,7 +59,7 @@ public function __construct(Service $graphQlService, $attribute, $fieldDefinitio } /** - * @param mixed $value + * @param BaseDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Hotspotimage.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Hotspotimage.php index f5f5a366..9e54063e 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Hotspotimage.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Hotspotimage.php @@ -34,9 +34,10 @@ class Hotspotimage extends Base * @param ClassDefinition|null $class * @param object|null $container * - * @throws \Exception + * @return array + * + *@throws \Exception * - * @return mixed */ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class = null, $container = null) { @@ -55,7 +56,7 @@ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class * @param ClassDefinition|null $class * @param object|null $container * - * @return \GraphQL\Type\Definition\ListOfType|mixed + * @return mixed * * @throws \Exception */ @@ -66,6 +67,13 @@ public function getFieldType(Data $fieldDefinition, $class = null, $container = return $hotspotType; } + /** + * @param string $attribute + * @param Data $fieldDefinition + * @param ClassDefinition $class + * + * @return array + */ public function getResolver($attribute, $fieldDefinition, $class) { diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Href.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Href.php index 836c118b..6fef5154 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Href.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Href.php @@ -27,7 +27,7 @@ class Href extends Base * @param ClassDefinition|null $class * @param object|null $container * - * @return mixed + * @return array */ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class = null, $container = null) { @@ -43,13 +43,20 @@ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class * @param ClassDefinition|null $class * @param object|null $container * - * @return \GraphQL\Type\Definition\ListOfType|mixed + * @return HrefType */ public function getFieldType(Data $fieldDefinition, $class = null, $container = null) { return new HrefType($this->getGraphQlService(), $fieldDefinition, $class, ['description' => 'pseudo class for field ' . $fieldDefinition->getName()]); } + /** + * @param string $attribute + * @param Data $fieldDefinition + * @param ClassDefinition $class + * + * @return array + */ public function getResolver($attribute, $fieldDefinition, $class) { $resolver = new Helper\Href($this->getGraphQlService(), $attribute, $fieldDefinition, $class); diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Image.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Image.php index 6a334d72..c466e7d0 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Image.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Image.php @@ -15,8 +15,18 @@ namespace Pimcore\Bundle\DataHubBundle\GraphQL\DataObjectQueryFieldConfigGenerator; +use Pimcore\Model\DataObject\ClassDefinition; +use Pimcore\Model\DataObject\ClassDefinition\Data; + class Image extends AssetBase { + /** + * @param string $attribute + * @param Data $fieldDefinition + * @param ClassDefinition $class + * + * @return array + */ public function getResolver($attribute, $fieldDefinition, $class) { $resolver = new Helper\Image($this->getGraphQlService(), $attribute, $fieldDefinition, $class); diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/ImageGallery.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/ImageGallery.php index a0ecbead..eaa300f4 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/ImageGallery.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/ImageGallery.php @@ -35,9 +35,10 @@ class ImageGallery extends Base * @param ClassDefinition|null $class * @param object|null $container * - * @throws \Exception + * @return array + * + *@throws \Exception * - * @return mixed */ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class = null, $container = null) { @@ -59,7 +60,7 @@ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class * @param ClassDefinition|null $class * @param object|null $container * - * @return \GraphQL\Type\Definition\ListOfType|mixed + * @return \GraphQL\Type\Definition\ListOfType * * @throws \Exception */ @@ -70,6 +71,13 @@ public function getFieldType(Data $fieldDefinition, $class = null, $container = return Type::listOf($hotspotType); } + /** + * @param string $attribute + * @param Data $fieldDefinition + * @param ClassDefinition $class + * + * @return array + */ public function getResolver($attribute, $fieldDefinition, $class) { /** @var Data\ImageGallery $fieldDefinition */ diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Link.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Link.php index 087517a0..ece938bb 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Link.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Link.php @@ -27,7 +27,7 @@ class Link extends Base * @param ClassDefinition|null $class * @param object|null $container * - * @return mixed + * @return array */ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class = null, $container = null) { @@ -43,7 +43,7 @@ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class * @param ClassDefinition|null $class * @param object|null $container * - * @return \GraphQL\Type\Definition\ListOfType|mixed + * @return LinkType */ public function getFieldType(Data $fieldDefinition, $class = null, $container = null) { diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Multihref.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Multihref.php index 6dcdbeb7..6cf5993c 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Multihref.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Multihref.php @@ -34,7 +34,7 @@ class Multihref extends Base implements TypeDefinitionInterface * @param ClassDefinition|null $class * @param object|null $container * - * @return mixed + * @return array */ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class = null, $container = null) { @@ -53,13 +53,20 @@ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class * @param ClassDefinition|null $class * @param object|null $container * - * @return \GraphQL\Type\Definition\ListOfType|mixed + * @return \GraphQL\Type\Definition\ListOfType */ public function getFieldType(Data $fieldDefinition, $class = null, $container = null) { return Type::listOf(new HrefType($this->getGraphQlService(), $fieldDefinition, $class)); } + /** + * @param string $attribute + * @param Data $fieldDefinition + * @param ClassDefinition $class + * + * @return array + */ public function getResolver($attribute, $fieldDefinition, $class) { $resolver = new Helper\Multihref($this->getGraphQlService(), $attribute, $fieldDefinition, $class); diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/MultihrefMetadata.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/MultihrefMetadata.php index 83d381d3..5aba5cea 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/MultihrefMetadata.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/MultihrefMetadata.php @@ -28,7 +28,7 @@ class MultihrefMetadata extends Base * @param ClassDefinition|null $class * @param object|null $container * - * @return mixed + * @return array */ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class = null, $container = null) { @@ -47,13 +47,20 @@ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class * @param ClassDefinition|null $class * @param object|null $container * - * @return \GraphQL\Type\Definition\ListOfType|mixed + * @return \GraphQL\Type\Definition\ListOfType */ public function getFieldType(Data $fieldDefinition, $class = null, $container = null) { return Type::listOf(new MultihrefMetadataType($this->getGraphQlService(), $fieldDefinition, $class)); } + /** + * @param string $attribute + * @param Data $fieldDefinition + * @param ClassDefinition $class + * + * @return array + */ public function getResolver($attribute, $fieldDefinition, $class) { $resolver = new Helper\MultihrefMetadata($this->getGraphQlService(), $attribute, $fieldDefinition, $class); diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Multiselect.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Multiselect.php index 2a3e588d..321512ed 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Multiselect.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Multiselect.php @@ -27,7 +27,7 @@ class Multiselect extends Base * @param ClassDefinition|null $class * @param object|null $container * - * @return mixed + * @return array */ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class = null, $container = null) { @@ -42,7 +42,7 @@ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class * @param ClassDefinition|null $class * @param object|null $container * - * @return \GraphQL\Type\Definition\ListOfType|mixed + * @return \GraphQL\Type\Definition\ListOfType */ public function getFieldType(Data $fieldDefinition, $class = null, $container = null) { diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Numeric.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Numeric.php index 19bc8a6e..a3ac4fc1 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Numeric.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Numeric.php @@ -27,7 +27,7 @@ class Numeric extends Base * @param ClassDefinition|null $class * @param object|null $container * - * @return mixed + * @return array */ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class = null, $container = null) { @@ -42,7 +42,7 @@ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class * @param ClassDefinition|null $class * @param object|null $container * - * @return \GraphQL\Type\Definition\ListOfType|mixed + * @return \GraphQL\Type\Definition\ScalarType|void */ public function getFieldType(Data $fieldDefinition, $class = null, $container = null) { diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Objects.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Objects.php index 7807e1ba..e5a9517a 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Objects.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Objects.php @@ -34,7 +34,7 @@ class Objects extends Base implements TypeDefinitionInterface * @param ClassDefinition|null $class * @param object|null $container * - * @return mixed + * @return array */ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class = null, $container = null) { @@ -56,13 +56,20 @@ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class * @param ClassDefinition|null $class * @param object|null $container * - * @return \GraphQL\Type\Definition\ListOfType|mixed + * @return \GraphQL\Type\Definition\ListOfType */ public function getFieldType(Data $fieldDefinition, $class = null, $container = null) { return Type::listOf(new HrefType($this->getGraphQlService(), $fieldDefinition, $class)); } + /** + * @param string $attribute + * @param Data $fieldDefinition + * @param ClassDefinition $class + * + * @return array + */ public function getResolver($attribute, $fieldDefinition, $class) { $resolver = new Helper\Objects($this->getGraphQlService(), $attribute, $fieldDefinition, $class); diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/ObjectsMetadata.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/ObjectsMetadata.php index b35390b2..321d9e4e 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/ObjectsMetadata.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/ObjectsMetadata.php @@ -29,7 +29,7 @@ class ObjectsMetadata extends Base * @param ClassDefinition|null $class * @param object|null $container * - * @return mixed + * @return array */ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class = null, $container = null) { @@ -49,7 +49,7 @@ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class * @param ClassDefinition|null $class * @param object|null $container * - * @return \GraphQL\Type\Definition\ListOfType|mixed + * @return \GraphQL\Type\Definition\ListOfType */ public function getFieldType(Data $fieldDefinition, $class = null, $container = null) { @@ -58,6 +58,13 @@ public function getFieldType(Data $fieldDefinition, $class = null, $container = return Type::listOf($type); } + /** + * @param string $attribute + * @param Data $fieldDefinition + * @param ClassDefinition $class + * + * @return array + */ public function getResolver($attribute, $fieldDefinition, $class) { $resolver = new Helper\ObjectsMetadata($this->getGraphQlService(), $attribute, $fieldDefinition, $class); diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/ReverseManyToManyObjectRelation.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/ReverseManyToManyObjectRelation.php index 474d45b2..8703ec81 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/ReverseManyToManyObjectRelation.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/ReverseManyToManyObjectRelation.php @@ -28,7 +28,7 @@ class ReverseManyToManyObjectRelation extends Base * @param ClassDefinition|null $class * @param object|null $container * - * @return mixed + * @return array */ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class = null, $container = null) { @@ -51,7 +51,7 @@ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class * @param ClassDefinition|null $class * @param object|null $container * - * @return \GraphQL\Type\Definition\ListOfType|mixed + * @return \GraphQL\Type\Definition\ListOfType */ public function getFieldType(Data $fieldDefinition, $class = null, $container = null) { @@ -61,6 +61,13 @@ public function getFieldType(Data $fieldDefinition, $class = null, $container = return $type; } + /** + * @param string $attribute + * @param Data $fieldDefinition + * @param ClassDefinition $class + * + * @return array + */ public function getResolver($attribute, $fieldDefinition, $class) { $resolver = new \Pimcore\Bundle\DataHubBundle\GraphQL\DataObjectQueryFieldConfigGenerator\Helper\ReverseManyToManyObjects($this->getGraphQlService(), $attribute, $fieldDefinition, $class); diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Slider.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Slider.php index 9110ee48..f5b62182 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Slider.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Slider.php @@ -27,7 +27,7 @@ class Slider extends Base * @param ClassDefinition|null $class * @param object|null $container * - * @return mixed + * @return array */ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class = null, $container = null) { @@ -42,7 +42,7 @@ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class * @param ClassDefinition|null $class * @param object|null $container * - * @return \GraphQL\Type\Definition\ListOfType|mixed + * @return \GraphQL\Type\Definition\ScalarType|void */ public function getFieldType(Data $fieldDefinition, $class = null, $container = null) { diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/StructuredTable.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/StructuredTable.php index b57ad5ba..a47d45a9 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/StructuredTable.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/StructuredTable.php @@ -20,11 +20,6 @@ class StructuredTable extends AbstractTable { - /** - * @param Data $fieldDefinition - * - * @return array - */ protected function getTableColumns(Data $fieldDefinition): array { $cols = []; diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Table.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Table.php index 4727372f..2b2637d6 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Table.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Table.php @@ -20,11 +20,6 @@ class Table extends AbstractTable { - /** - * @param Data $fieldDefinition - * - * @return array - */ protected function getTableColumns(Data $fieldDefinition): array { $columns = []; diff --git a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Video.php b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Video.php index bf627409..670a0faa 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGenerator/Video.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGenerator/Video.php @@ -26,7 +26,7 @@ class Video extends Base * @param ClassDefinition|null $class * @param object|null $container * - * @return mixed + * @return array */ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class = null, $container = null) { @@ -41,7 +41,7 @@ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class * @param ClassDefinition|null $class * @param object|null $container * - * @return \GraphQL\Type\Definition\ListOfType|mixed + * @return mixed */ public function getFieldType(Data $fieldDefinition, $class = null, $container = null) { diff --git a/src/GraphQL/DataObjectQueryFieldConfigGeneratorInterface.php b/src/GraphQL/DataObjectQueryFieldConfigGeneratorInterface.php index b8353224..9fec6faf 100644 --- a/src/GraphQL/DataObjectQueryFieldConfigGeneratorInterface.php +++ b/src/GraphQL/DataObjectQueryFieldConfigGeneratorInterface.php @@ -44,7 +44,7 @@ public function getFieldType(Data $fieldDefinition, $class = null, $container = * @param Data|null $fieldDefinition * @param ClassDefinition|null $class * - * @return callable(mixed $value, array $args, array $context, \GraphQL\Type\Definition\ResolveInfo $info): mixed + * @return array|callable(mixed $value, array $args, array $context, \GraphQL\Type\Definition\ResolveInfo $info): mixed */ public function getResolver($attribute, $fieldDefinition, $class); } diff --git a/src/GraphQL/DataObjectQueryOperatorConfigGenerator/Base.php b/src/GraphQL/DataObjectQueryOperatorConfigGenerator/Base.php index 8f73a3fd..6b2aafe1 100644 --- a/src/GraphQL/DataObjectQueryOperatorConfigGenerator/Base.php +++ b/src/GraphQL/DataObjectQueryOperatorConfigGenerator/Base.php @@ -28,9 +28,6 @@ abstract class Base implements OperatorTypeDefinitionInterface */ protected $graphQlService; - /** - * @param Service $graphQlService - */ public function __construct(Service $graphQlService) { $this->graphQlService = $graphQlService; @@ -102,7 +99,7 @@ public function enrichConfig($config, $container = null) * @param ClassDefinition|null $class * @param object|null $container * - * @return \GraphQL\Type\Definition\ListOfType|mixed + * @return \GraphQL\Type\Definition\ScalarType */ public function getFieldType($attributes, $class = null, $container = null) { diff --git a/src/GraphQL/DataObjectQueryOperatorConfigGenerator/IntBase.php b/src/GraphQL/DataObjectQueryOperatorConfigGenerator/IntBase.php index 8b1cc003..a596a4f0 100644 --- a/src/GraphQL/DataObjectQueryOperatorConfigGenerator/IntBase.php +++ b/src/GraphQL/DataObjectQueryOperatorConfigGenerator/IntBase.php @@ -15,11 +15,22 @@ namespace Pimcore\Bundle\DataHubBundle\GraphQL\DataObjectQueryOperatorConfigGenerator; +use GraphQL\Type\Definition\ScalarType; use GraphQL\Type\Definition\Type; use Pimcore\Model\DataObject\ClassDefinition; class IntBase extends Base { + /** + * @param string $typeName + * @param array $nodeDef + * @param ClassDefinition|null $class + * @param object|null $container + * @param array $params + + * + * @return ScalarType|Type + */ public function getGraphQlType($typeName, $nodeDef, $class = null, $container = null, $params = []) { return Type::int(); @@ -30,7 +41,7 @@ public function getGraphQlType($typeName, $nodeDef, $class = null, $container = * @param ClassDefinition|null $class * @param object|null $container * - * @return \GraphQL\Type\Definition\ListOfType|mixed + * @return \GraphQL\Type\Definition\ScalarType */ public function getFieldType($attributes, $class = null, $container = null) { diff --git a/src/GraphQL/DataObjectQueryOperatorConfigGenerator/Merge.php b/src/GraphQL/DataObjectQueryOperatorConfigGenerator/Merge.php index 335899dc..e57d08bd 100644 --- a/src/GraphQL/DataObjectQueryOperatorConfigGenerator/Merge.php +++ b/src/GraphQL/DataObjectQueryOperatorConfigGenerator/Merge.php @@ -23,6 +23,11 @@ class Merge extends StringBase { + /** + * @param array $attributes + * + * @return array|string|string[]|null + */ protected function getFieldname($attributes) { $label = ($attributes['label'] ? $attributes['label'] : '#'.uniqid()); @@ -39,7 +44,7 @@ protected function getFieldname($attributes) * @param object|null $container * @param array $params * - * @return mixed + * @return array */ public function getGraphQlQueryOperatorConfig($typeName, $nodeConfig, $class = null, $container = null, $params = []) { @@ -80,6 +85,15 @@ public function enrichConfig($config, $container = null) return $config; } + /** + * @param string $typeName + * @param array $nodeDef + * @param ClassDefinition|null $class + * @param object|null $container + * @param array $params + * + * @return ListOfType|Type + */ public function getGraphQlType($typeName, $nodeDef, $class = null, $container = null, $params = []) { $attributes = $nodeDef['attributes']; diff --git a/src/GraphQL/DataObjectType/AbstractRelationsType.php b/src/GraphQL/DataObjectType/AbstractRelationsType.php index a91aabea..df138076 100644 --- a/src/GraphQL/DataObjectType/AbstractRelationsType.php +++ b/src/GraphQL/DataObjectType/AbstractRelationsType.php @@ -69,7 +69,7 @@ public function __construct(Service $graphQlService, Data $fieldDefinition = nul } /** - * @return mixed + * @return ClassDefinition|Definition|null */ public function getClass() { @@ -159,9 +159,6 @@ public function resolveType($element, $context, ResolveInfo $info) return null; } - /** - * @return Data - */ public function getFieldDefinition(): Data { return $this->fieldDefinition; diff --git a/src/GraphQL/DataObjectType/BlockEntryType.php b/src/GraphQL/DataObjectType/BlockEntryType.php index 3f66ce5b..5dd997e5 100644 --- a/src/GraphQL/DataObjectType/BlockEntryType.php +++ b/src/GraphQL/DataObjectType/BlockEntryType.php @@ -61,6 +61,14 @@ public function __construct(Service $graphQlService, Data $fieldDefinition, $cla parent::__construct($config); } + /** + * @param string $type + * @param Service $graphQlService + * @param Data $fieldDefinition + * @param ClassDefinition|null $class + * + * @return static|null + */ public static function getInstance($type, Service $graphQlService, Data $fieldDefinition, $class) { if (!isset(self::$instance[$type])) { @@ -108,6 +116,12 @@ public function build(&$config) $config['fields'] = $fields; } + /** + * @param Data $fieldDef + * @param bool $localized + * + * @return mixed + */ protected function prepareField(Data $fieldDef, bool $localized = false) { $field = $this->getGraphQlService()->getObjectFieldHelper()->getGraphQlQueryFieldConfig( diff --git a/src/GraphQL/DataObjectType/GeoboundsType.php b/src/GraphQL/DataObjectType/GeoboundsType.php index 8c0236bd..c4819abe 100644 --- a/src/GraphQL/DataObjectType/GeoboundsType.php +++ b/src/GraphQL/DataObjectType/GeoboundsType.php @@ -21,6 +21,9 @@ class GeoboundsType extends ObjectType { protected static $instance; + /** + * @return static + */ public static function getInstance() { $resolver = new \Pimcore\Bundle\DataHubBundle\GraphQL\Resolver\Geobounds(); diff --git a/src/GraphQL/DataObjectType/GeopointType.php b/src/GraphQL/DataObjectType/GeopointType.php index 23dfbc55..c0ac2131 100644 --- a/src/GraphQL/DataObjectType/GeopointType.php +++ b/src/GraphQL/DataObjectType/GeopointType.php @@ -22,6 +22,9 @@ class GeopointType extends ObjectType { protected static $instance; + /** + * @return static + */ public static function getInstance() { $resolver = new \Pimcore\Bundle\DataHubBundle\GraphQL\Resolver\Geopoint(); diff --git a/src/GraphQL/DataObjectType/LinkType.php b/src/GraphQL/DataObjectType/LinkType.php index 0a47a8a8..b9f25b77 100644 --- a/src/GraphQL/DataObjectType/LinkType.php +++ b/src/GraphQL/DataObjectType/LinkType.php @@ -22,6 +22,9 @@ class LinkType extends ObjectType { protected static $instance; + /** + * @return static + */ public static function getInstance() { if (!self::$instance) { diff --git a/src/GraphQL/DataObjectType/LocalizedType.php b/src/GraphQL/DataObjectType/LocalizedType.php index 57ce5387..12608b7b 100644 --- a/src/GraphQL/DataObjectType/LocalizedType.php +++ b/src/GraphQL/DataObjectType/LocalizedType.php @@ -29,7 +29,7 @@ class LocalizedType extends InputObjectType /** * @param mixed $determinedType * - * @return mixed|LocalizedType|\GraphQL\Type\Definition\Type + * @return mixed */ public static function getInstance($determinedType) { diff --git a/src/GraphQL/DataObjectType/MergeType.php b/src/GraphQL/DataObjectType/MergeType.php index 9af90804..a704a5c8 100644 --- a/src/GraphQL/DataObjectType/MergeType.php +++ b/src/GraphQL/DataObjectType/MergeType.php @@ -72,9 +72,6 @@ public function setClass($class): void $this->class = $class; } - /** - * @return array - */ public function getTypes(): array { $nodeDef = $this->nodeDef; diff --git a/src/GraphQL/DataObjectType/ObjectTreeType.php b/src/GraphQL/DataObjectType/ObjectTreeType.php index dd861dda..6af3ad7f 100644 --- a/src/GraphQL/DataObjectType/ObjectTreeType.php +++ b/src/GraphQL/DataObjectType/ObjectTreeType.php @@ -62,6 +62,9 @@ public function getTypes(): array return $types; } + /** + * @inheritdoc + */ public function resolveType($element, $context, ResolveInfo $info) { if (!$element) { diff --git a/src/GraphQL/DataObjectType/PimcoreObjectType.php b/src/GraphQL/DataObjectType/PimcoreObjectType.php index e94bae7e..3fdd8656 100644 --- a/src/GraphQL/DataObjectType/PimcoreObjectType.php +++ b/src/GraphQL/DataObjectType/PimcoreObjectType.php @@ -186,6 +186,15 @@ public function build($context = []) $this->config['fields'] = $fields; } + /** + * @param array $column + * @param ClassDefinition $class + * @param array $fields + * + * @return void + * + * @throws \Exception + */ public function addFieldCollectionDefs($column, ClassDefinition $class, &$fields) { $fieldname = $column['attributes']['attribute']; diff --git a/src/GraphQL/DataObjectType/QuantityValueType.php b/src/GraphQL/DataObjectType/QuantityValueType.php index 5aa4e6eb..cb05ddcc 100644 --- a/src/GraphQL/DataObjectType/QuantityValueType.php +++ b/src/GraphQL/DataObjectType/QuantityValueType.php @@ -55,6 +55,12 @@ public function build(&$config) $config['fields'] = self::getFieldConfig($this->getGraphQlService(), $valueType); } + /** + * @param Service $graphQlService + * @param string $valueType + * + * @return array[] + */ public static function getFieldConfig(Service $graphQlService, $valueType) { $resolver = new \Pimcore\Bundle\DataHubBundle\GraphQL\Resolver\QuantityValue(); diff --git a/src/GraphQL/DataObjectType/UrlSlugType.php b/src/GraphQL/DataObjectType/UrlSlugType.php index 144d27bc..50eed46f 100644 --- a/src/GraphQL/DataObjectType/UrlSlugType.php +++ b/src/GraphQL/DataObjectType/UrlSlugType.php @@ -50,6 +50,11 @@ public function build(&$config) $config['fields'] = self::getFieldConfig($this->getGraphQlService()); } + /** + * @param Service $graphQlService + * + * @return array[] + */ public static function getFieldConfig(Service $graphQlService) { $resolver = new \Pimcore\Bundle\DataHubBundle\GraphQL\Resolver\UrlSlug(); diff --git a/src/GraphQL/DataObjectType/VideoType.php b/src/GraphQL/DataObjectType/VideoType.php index 9ea4329f..d68339a8 100644 --- a/src/GraphQL/DataObjectType/VideoType.php +++ b/src/GraphQL/DataObjectType/VideoType.php @@ -29,10 +29,6 @@ class VideoType extends ObjectType */ protected $videoDataType; - /** - * @param Service $graphQlService - * @param VideoTypeDataType $videoDataType - */ public function __construct(Service $graphQlService, VideoTypeDataType $videoDataType) { $this->setGraphQLService($graphQlService); diff --git a/src/GraphQL/DocumentElementInputProcessor/Base.php b/src/GraphQL/DocumentElementInputProcessor/Base.php index 2410ad6a..d1ca0536 100644 --- a/src/GraphQL/DocumentElementInputProcessor/Base.php +++ b/src/GraphQL/DocumentElementInputProcessor/Base.php @@ -30,10 +30,6 @@ abstract class Base */ protected $editableLoader; - /** - * @param EditableLoaderInterface $editableLoader - * @param Service $graphQlService - */ public function __construct(EditableLoaderInterface $editableLoader, Service $graphQlService) { $this->editableLoader = $editableLoader; diff --git a/src/GraphQL/DocumentElementInputProcessor/EditablesTrait.php b/src/GraphQL/DocumentElementInputProcessor/EditablesTrait.php index 76a84c44..8445b554 100644 --- a/src/GraphQL/DocumentElementInputProcessor/EditablesTrait.php +++ b/src/GraphQL/DocumentElementInputProcessor/EditablesTrait.php @@ -15,16 +15,20 @@ namespace Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementInputProcessor; -use Pimcore\Model\Document\Editable; use Pimcore\Model\Document\PageSnippet; trait EditablesTrait { + /** + * @param PageSnippet $document + * @param string $editableName + * + * @return void + */ public function cleanEditables(PageSnippet $document, $editableName) { $editables = $document->getEditables(); - /** @var Editable $editable */ foreach ($editables as $editable) { $name = $editable->getName(); if ($name === $editableName || strpos($name, $editableName . '.') === 0) { diff --git a/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Areablock.php b/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Areablock.php index d9dbccce..39cf12b1 100644 --- a/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Areablock.php +++ b/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Areablock.php @@ -32,10 +32,6 @@ class Areablock extends Base /** @var \Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementInputProcessor\Areablock */ protected $processor; - /** - * @param Service $graphQlService - * @param AreablockDataInputType $areablockDataInputType - */ public function __construct(Service $graphQlService, AreablockDataInputType $areablockDataInputType, \Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementInputProcessor\Areablock $processor) { $this->setGraphQLService($graphQlService); @@ -43,6 +39,9 @@ public function __construct(Service $graphQlService, AreablockDataInputType $are $this->processor = $processor; } + /** + * @return array + */ public function getDocumentElementMutationFieldConfig() { if (!self::$itemType) { diff --git a/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Base.php b/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Base.php index d6a7ca7e..f77f55b6 100644 --- a/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Base.php +++ b/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Base.php @@ -22,9 +22,6 @@ class Base { use ServiceTrait; - /** - * @param Service $graphQlService - */ public function __construct(Service $graphQlService) { $this->setGraphQLService($graphQlService); diff --git a/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Block.php b/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Block.php index 541c9ad5..2fd38197 100644 --- a/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Block.php +++ b/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Block.php @@ -28,16 +28,15 @@ class Block extends Base /** @var \Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementInputProcessor\Block */ public $processor; - /** - * @param Service $graphQlService - * @param \Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementInputProcessor\Block $processor - */ public function __construct(Service $graphQlService, \Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementInputProcessor\Block $processor) { parent::__construct($graphQlService); $this->processor = $processor; } + /** + * @return array + */ public function getDocumentElementMutationFieldConfig() { if (!self::$itemType) { diff --git a/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Embed.php b/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Embed.php index c431f4ce..d0d470ab 100644 --- a/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Embed.php +++ b/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Embed.php @@ -26,16 +26,15 @@ class Embed extends Base */ public $processor; - /** - * @param Service $graphQlService - * @param \Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementInputProcessor\Embed $processor - */ public function __construct(Service $graphQlService, \Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementInputProcessor\Embed $processor) { parent::__construct($graphQlService); $this->processor = $processor; } + /** + * @return array + */ public function getDocumentElementMutationFieldConfig() { return [ diff --git a/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Image.php b/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Image.php index 068169ea..e58b94d7 100644 --- a/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Image.php +++ b/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Image.php @@ -26,16 +26,15 @@ class Image extends Base /** @var \Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementInputProcessor\Image */ protected $processor; - /** - * @param Service $graphQlService - * @param \Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementInputProcessor\Image $processor - */ public function __construct(Service $graphQlService, \Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementInputProcessor\Image $processor) { parent::__construct($graphQlService); $this->processor = $processor; } + /** + * @return array + */ public function getDocumentElementMutationFieldConfig() { return [ diff --git a/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Input.php b/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Input.php index 770c7e83..2dfcd6a0 100644 --- a/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Input.php +++ b/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Input.php @@ -26,16 +26,15 @@ class Input extends Base */ public $processor; - /** - * @param Service $graphQlService - * @param \Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementInputProcessor\Input $processor - */ public function __construct(Service $graphQlService, \Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementInputProcessor\Input $processor) { parent::__construct($graphQlService); $this->processor = $processor; } + /** + * @return array + */ public function getDocumentElementMutationFieldConfig() { return [ diff --git a/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Multiselect.php b/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Multiselect.php index cd56eda0..517be7ea 100644 --- a/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Multiselect.php +++ b/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Multiselect.php @@ -24,16 +24,15 @@ class Multiselect extends Base /** @var \Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementInputProcessor\Multiselect */ public $processor; - /** - * @param Service $graphQlService - * @param \Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementInputProcessor\Multiselect $processor - */ public function __construct(Service $graphQlService, \Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementInputProcessor\Multiselect $processor) { parent::__construct($graphQlService); $this->processor = $processor; } + /** + * @return array + */ public function getDocumentElementMutationFieldConfig() { return [ diff --git a/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Scheduledblock.php b/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Scheduledblock.php index 8abecc3b..ead1d799 100644 --- a/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Scheduledblock.php +++ b/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Scheduledblock.php @@ -32,11 +32,6 @@ class Scheduledblock extends Base /** @var \Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementInputProcessor\Scheduledblock */ protected $processor; - /** - * @param Service $graphQlService - * @param ScheduledblockDataInputType $scheduledblockDataInputType - * @param \Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementInputProcessor\Scheduledblock $processor - */ public function __construct(Service $graphQlService, ScheduledblockDataInputType $scheduledblockDataInputType, \Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementInputProcessor\Scheduledblock $processor) { $this->setGraphQLService($graphQlService); @@ -44,6 +39,9 @@ public function __construct(Service $graphQlService, ScheduledblockDataInputType $this->processor = $processor; } + /** + * @return array + */ public function getDocumentElementMutationFieldConfig() { if (!self::$itemType) { diff --git a/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Select.php b/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Select.php index 56b1943a..49bbbb59 100644 --- a/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Select.php +++ b/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Select.php @@ -24,16 +24,15 @@ class Select extends Base /** @var \Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementInputProcessor\Select */ public $processor; - /** - * @param Service $graphQlService - * @param \Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementInputProcessor\Select $processor - */ public function __construct(Service $graphQlService, \Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementInputProcessor\Select $processor) { parent::__construct($graphQlService); $this->processor = $processor; } + /** + * @return array + */ public function getDocumentElementMutationFieldConfig() { return [ diff --git a/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Wysiwyg.php b/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Wysiwyg.php index e4985c0f..f3873222 100644 --- a/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Wysiwyg.php +++ b/src/GraphQL/DocumentElementMutationFieldConfigGenerator/Wysiwyg.php @@ -24,16 +24,15 @@ class Wysiwyg extends Base /** @var \Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementInputProcessor\Input */ public $processor; - /** - * @param Service $graphQlService - * @param \Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementInputProcessor\Input $processor - */ public function __construct(Service $graphQlService, \Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementInputProcessor\Input $processor) { parent::__construct($graphQlService); $this->processor = $processor; } + /** + * @return array + */ public function getDocumentElementMutationFieldConfig() { return [ diff --git a/src/GraphQL/DocumentElementQueryFieldConfigGenerator/Areablock.php b/src/GraphQL/DocumentElementQueryFieldConfigGenerator/Areablock.php index 281e01ba..97be9446 100644 --- a/src/GraphQL/DocumentElementQueryFieldConfigGenerator/Areablock.php +++ b/src/GraphQL/DocumentElementQueryFieldConfigGenerator/Areablock.php @@ -23,10 +23,6 @@ class Areablock extends Base { protected $areablockDataType; - /** - * @param Service $graphQlService - * @param AreablockDataType $areablockDataType - */ public function __construct(Service $graphQlService, AreablockDataType $areablockDataType) { $this->areablockDataType = $areablockDataType; diff --git a/src/GraphQL/DocumentElementQueryFieldConfigGenerator/Base.php b/src/GraphQL/DocumentElementQueryFieldConfigGenerator/Base.php index 2a5cb1ed..f24a54cd 100644 --- a/src/GraphQL/DocumentElementQueryFieldConfigGenerator/Base.php +++ b/src/GraphQL/DocumentElementQueryFieldConfigGenerator/Base.php @@ -23,9 +23,6 @@ abstract class Base { use ServiceTrait; - /** - * @param Service $graphQlService - */ public function __construct(Service $graphQlService) { $this->setGraphQLService($graphQlService); diff --git a/src/GraphQL/DocumentElementQueryFieldConfigGenerator/Input.php b/src/GraphQL/DocumentElementQueryFieldConfigGenerator/Input.php index 6e6307f0..07c34db7 100644 --- a/src/GraphQL/DocumentElementQueryFieldConfigGenerator/Input.php +++ b/src/GraphQL/DocumentElementQueryFieldConfigGenerator/Input.php @@ -20,7 +20,7 @@ class Input extends Base { /** - * @return \GraphQL\Type\Definition\StringType|InputType + * @return InputType */ public function getFieldType() { diff --git a/src/GraphQL/DocumentElementQueryFieldConfigGenerator/Link.php b/src/GraphQL/DocumentElementQueryFieldConfigGenerator/Link.php index 18e2d815..6df9bfc8 100644 --- a/src/GraphQL/DocumentElementQueryFieldConfigGenerator/Link.php +++ b/src/GraphQL/DocumentElementQueryFieldConfigGenerator/Link.php @@ -16,17 +16,12 @@ namespace Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementQueryFieldConfigGenerator; use Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementType\LinkDataType; -use Pimcore\Bundle\DataHubBundle\GraphQL\DocumentType\LinkType; use Pimcore\Bundle\DataHubBundle\GraphQL\Service; class Link extends Base { protected $linkDataType; - /** - * @param Service $graphQlService - * @param LinkDataType $linkDataType - */ public function __construct(Service $graphQlService, LinkDataType $linkDataType) { $this->linkDataType = $linkDataType; @@ -34,7 +29,7 @@ public function __construct(Service $graphQlService, LinkDataType $linkDataType) } /** - * @return LinkType + * @return \Pimcore\Bundle\DataHubBundle\GraphQL\DocumentElementType\LinkType */ public function getFieldType() { diff --git a/src/GraphQL/DocumentElementQueryFieldConfigGenerator/Relation.php b/src/GraphQL/DocumentElementQueryFieldConfigGenerator/Relation.php index 78e9c738..d0788546 100644 --- a/src/GraphQL/DocumentElementQueryFieldConfigGenerator/Relation.php +++ b/src/GraphQL/DocumentElementQueryFieldConfigGenerator/Relation.php @@ -20,7 +20,7 @@ class Relation extends Base { /** - * @return \GraphQL\Type\Definition\StringType|RelationType + * @return RelationType * * @throws \Exception */ diff --git a/src/GraphQL/DocumentElementQueryFieldConfigGenerator/Scheduledblock.php b/src/GraphQL/DocumentElementQueryFieldConfigGenerator/Scheduledblock.php index fe1a0093..fb0cfd92 100644 --- a/src/GraphQL/DocumentElementQueryFieldConfigGenerator/Scheduledblock.php +++ b/src/GraphQL/DocumentElementQueryFieldConfigGenerator/Scheduledblock.php @@ -24,10 +24,6 @@ class Scheduledblock extends Base /** @var ScheduledblockDataType */ protected $scheduledblockDataType; - /** - * @param Service $graphQlService - * @param ScheduledblockDataType $scheduledblockDataType - */ public function __construct(Service $graphQlService, ScheduledblockDataType $scheduledblockDataType) { $this->scheduledblockDataType = $scheduledblockDataType; diff --git a/src/GraphQL/DocumentElementType/AreablockDataType.php b/src/GraphQL/DocumentElementType/AreablockDataType.php index f4ddce40..491fd4e5 100644 --- a/src/GraphQL/DocumentElementType/AreablockDataType.php +++ b/src/GraphQL/DocumentElementType/AreablockDataType.php @@ -25,9 +25,6 @@ class AreablockDataType extends ObjectType { use ServiceTrait; - /** - * @param Service $graphQlService - */ public function __construct(Service $graphQlService) { $this->graphQlService = $graphQlService; diff --git a/src/GraphQL/DocumentElementType/AreablockType.php b/src/GraphQL/DocumentElementType/AreablockType.php index 4978d393..87408a1a 100644 --- a/src/GraphQL/DocumentElementType/AreablockType.php +++ b/src/GraphQL/DocumentElementType/AreablockType.php @@ -24,6 +24,11 @@ class AreablockType extends ObjectType { protected static $instance; + /** + * @param AreablockDataType $areablockDataType + * + * @return static + */ public static function getInstance(AreablockDataType $areablockDataType) { if (!self::$instance) { diff --git a/src/GraphQL/DocumentElementType/BlockType.php b/src/GraphQL/DocumentElementType/BlockType.php index 97409e2b..a1e1b26a 100644 --- a/src/GraphQL/DocumentElementType/BlockType.php +++ b/src/GraphQL/DocumentElementType/BlockType.php @@ -24,6 +24,9 @@ class BlockType extends ObjectType { protected static $instance; + /** + * @return static + */ public static function getInstance() { if (!self::$instance) { diff --git a/src/GraphQL/DocumentElementType/CheckboxType.php b/src/GraphQL/DocumentElementType/CheckboxType.php index 3c887038..a51d5a0b 100644 --- a/src/GraphQL/DocumentElementType/CheckboxType.php +++ b/src/GraphQL/DocumentElementType/CheckboxType.php @@ -24,6 +24,9 @@ class CheckboxType extends ObjectType { protected static $instance; + /** + * @return static + */ public static function getInstance() { if (!self::$instance) { diff --git a/src/GraphQL/DocumentElementType/DateType.php b/src/GraphQL/DocumentElementType/DateType.php index 22b98c37..fdd2a409 100644 --- a/src/GraphQL/DocumentElementType/DateType.php +++ b/src/GraphQL/DocumentElementType/DateType.php @@ -25,6 +25,9 @@ class DateType extends ObjectType { protected static $instance; + /** + * @return static + */ public static function getInstance() { if (!self::$instance) { diff --git a/src/GraphQL/DocumentElementType/EmbedType.php b/src/GraphQL/DocumentElementType/EmbedType.php index 9bd03e51..ce83ce53 100644 --- a/src/GraphQL/DocumentElementType/EmbedType.php +++ b/src/GraphQL/DocumentElementType/EmbedType.php @@ -25,6 +25,9 @@ class EmbedType extends ObjectType { protected static $instance; + /** + * @return static + */ public static function getInstance() { if (!self::$instance) { diff --git a/src/GraphQL/DocumentElementType/InputType.php b/src/GraphQL/DocumentElementType/InputType.php index 56597f28..8145530d 100644 --- a/src/GraphQL/DocumentElementType/InputType.php +++ b/src/GraphQL/DocumentElementType/InputType.php @@ -19,6 +19,9 @@ class InputType extends SimpleTextType { protected static $instance; + /** + * @return static + */ public static function getInstance() { if (!self::$instance) { diff --git a/src/GraphQL/DocumentElementType/LinkType.php b/src/GraphQL/DocumentElementType/LinkType.php index 87ec03c4..1ebc0c79 100644 --- a/src/GraphQL/DocumentElementType/LinkType.php +++ b/src/GraphQL/DocumentElementType/LinkType.php @@ -25,6 +25,8 @@ class LinkType extends ObjectType /** * @param LinkDataType $linkDataType + * + * @return static */ public static function getInstance(LinkDataType $linkDataType) { diff --git a/src/GraphQL/DocumentElementType/ScheduledblockDataType.php b/src/GraphQL/DocumentElementType/ScheduledblockDataType.php index 0a811870..8ab6d2a5 100644 --- a/src/GraphQL/DocumentElementType/ScheduledblockDataType.php +++ b/src/GraphQL/DocumentElementType/ScheduledblockDataType.php @@ -25,9 +25,6 @@ class ScheduledblockDataType extends ObjectType { use ServiceTrait; - /** - * @param Service $graphQlService - */ public function __construct(Service $graphQlService) { $this->graphQlService = $graphQlService; diff --git a/src/GraphQL/DocumentElementType/ScheduledblockType.php b/src/GraphQL/DocumentElementType/ScheduledblockType.php index 1814e006..90f03419 100644 --- a/src/GraphQL/DocumentElementType/ScheduledblockType.php +++ b/src/GraphQL/DocumentElementType/ScheduledblockType.php @@ -24,6 +24,11 @@ class ScheduledblockType extends ObjectType { protected static $instance; + /** + * @param ScheduledblockDataType $scheduledblockDataType + * + * @return static + */ public static function getInstance(ScheduledblockDataType $scheduledblockDataType) { if (!self::$instance) { diff --git a/src/GraphQL/DocumentElementType/SelectType.php b/src/GraphQL/DocumentElementType/SelectType.php index 7a00bd17..cd4db488 100644 --- a/src/GraphQL/DocumentElementType/SelectType.php +++ b/src/GraphQL/DocumentElementType/SelectType.php @@ -19,6 +19,9 @@ class SelectType extends SimpleTextType { protected static $instance; + /** + * @return static + */ public static function getInstance() { if (!self::$instance) { diff --git a/src/GraphQL/DocumentElementType/TableType.php b/src/GraphQL/DocumentElementType/TableType.php index 14c82b75..824c4121 100644 --- a/src/GraphQL/DocumentElementType/TableType.php +++ b/src/GraphQL/DocumentElementType/TableType.php @@ -19,6 +19,9 @@ class TableType extends SimpleTextType { protected static $instance; + /** + * @return static + */ public static function getInstance() { if (!self::$instance) { diff --git a/src/GraphQL/DocumentElementType/TextareaType.php b/src/GraphQL/DocumentElementType/TextareaType.php index d94be395..2501c178 100644 --- a/src/GraphQL/DocumentElementType/TextareaType.php +++ b/src/GraphQL/DocumentElementType/TextareaType.php @@ -19,6 +19,9 @@ class TextareaType extends SimpleTextType { protected static $instance; + /** + * @return static + */ public static function getInstance() { if (!self::$instance) { diff --git a/src/GraphQL/DocumentElementType/VideoType.php b/src/GraphQL/DocumentElementType/VideoType.php index 3dd60c4e..8f15e1f9 100644 --- a/src/GraphQL/DocumentElementType/VideoType.php +++ b/src/GraphQL/DocumentElementType/VideoType.php @@ -31,6 +31,8 @@ class VideoType extends ObjectType /** * @param Service $graphQlService * @param AssetType $assetType + * + * @return static */ public static function getInstance(Service $graphQlService, AssetType $assetType) { diff --git a/src/GraphQL/DocumentResolver/Link.php b/src/GraphQL/DocumentResolver/Link.php index 5f80f2b9..a0bf8bd6 100644 --- a/src/GraphQL/DocumentResolver/Link.php +++ b/src/GraphQL/DocumentResolver/Link.php @@ -27,9 +27,6 @@ class Link { use ServiceTrait; - /** - * @param GraphQLService $graphQlService - */ public function __construct(GraphQLService $graphQlService) { $this->graphQlService = $graphQlService; diff --git a/src/GraphQL/DocumentType/DocumentElementType.php b/src/GraphQL/DocumentType/DocumentElementType.php index 03f82bdc..72965eca 100644 --- a/src/GraphQL/DocumentType/DocumentElementType.php +++ b/src/GraphQL/DocumentType/DocumentElementType.php @@ -40,9 +40,6 @@ public function __construct(Service $graphQlService, $config = []) parent::__construct($config); } - /** - * @return array - */ public function getTypes(): array { $service = $this->getGraphQlService(); diff --git a/src/GraphQL/DocumentType/DocumentPageInputType.php b/src/GraphQL/DocumentType/DocumentPageInputType.php index 972695db..9f939e4b 100644 --- a/src/GraphQL/DocumentType/DocumentPageInputType.php +++ b/src/GraphQL/DocumentType/DocumentPageInputType.php @@ -70,6 +70,9 @@ public function build(&$config) ]; } + /** + * @return array + */ public function getProcessors() { return $this->processors; diff --git a/src/GraphQL/DocumentType/DocumentTranslationType.php b/src/GraphQL/DocumentType/DocumentTranslationType.php index 70985162..b9699c1e 100644 --- a/src/GraphQL/DocumentType/DocumentTranslationType.php +++ b/src/GraphQL/DocumentType/DocumentTranslationType.php @@ -24,10 +24,6 @@ class DocumentTranslationType extends ObjectType { use ServiceTrait; - /** - * @param Service $graphQlService - * @param array $config - */ public function __construct(Service $graphQlService, array $config = []) { $this->graphQlService = $graphQlService; diff --git a/src/GraphQL/DocumentType/DocumentTreeType.php b/src/GraphQL/DocumentType/DocumentTreeType.php index 449ec981..6101b1e7 100644 --- a/src/GraphQL/DocumentType/DocumentTreeType.php +++ b/src/GraphQL/DocumentType/DocumentTreeType.php @@ -22,6 +22,7 @@ use Pimcore\Bundle\DataHubBundle\GraphQL\Traits\ServiceTrait; use Pimcore\Cache\RuntimeCache; use Pimcore\Model\Document; +use Pimcore\Model\Element\ElementInterface; use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerAwareTrait; @@ -80,6 +81,13 @@ public function getTypes(): array return $types; } + /** + * @param ElementInterface $element + * @param array $context + * @param ResolveInfo $info + * + * @return mixed + */ public function resolveType($element, $context, ResolveInfo $info) { $rawElement = $element; diff --git a/src/GraphQL/DocumentType/PageSnippetType.php b/src/GraphQL/DocumentType/PageSnippetType.php index 11f56bd0..2d10181e 100644 --- a/src/GraphQL/DocumentType/PageSnippetType.php +++ b/src/GraphQL/DocumentType/PageSnippetType.php @@ -27,6 +27,7 @@ class PageSnippetType extends AbstractDocumentType /** * @param Service $graphQlService + * @param DocumentElementType $documentElementType * @param array $config * @param array $context */ diff --git a/src/GraphQL/FieldHelper/AbstractFieldHelper.php b/src/GraphQL/FieldHelper/AbstractFieldHelper.php index 82adb6cc..450e8c9d 100644 --- a/src/GraphQL/FieldHelper/AbstractFieldHelper.php +++ b/src/GraphQL/FieldHelper/AbstractFieldHelper.php @@ -49,7 +49,8 @@ public function skipField($container, $astName) * @param array $data * @param object $container * @param array $args - * @param ResolveInfo|null $resolveInfo + * @param array $context + * @param ResolveInfo|null $resolveInfo $resolveInfo */ public function doExtractData(FieldNode $ast, &$data, $container, $args, $context, $resolveInfo = null) { @@ -94,7 +95,6 @@ public function doExtractData(FieldNode $ast, &$data, $container, $args, $contex public function getArguments(FieldNode $ast) { $result = []; - /** @var NodeList $nodeList */ $nodeList = $ast->arguments; $count = $nodeList->count(); for ($i = 0; $i < $count; $i++) { @@ -166,7 +166,7 @@ public function processSelections(&$data, $selections, $container, $args, $conte for ($i = 0; $i < $count; $i++) { $inlineNode = $inlineSelections[$i]; if ($inlineNode instanceof FieldNode) { - $this->doExtractData($inlineNode, $data, $container, $args, $resolveInfo); + $this->doExtractData($inlineNode, $data, $container, $args, $context, $resolveInfo); } } } elseif ($selectionNode instanceof FragmentSpreadNode) { diff --git a/src/GraphQL/FieldHelper/AssetFieldHelper.php b/src/GraphQL/FieldHelper/AssetFieldHelper.php index c1ae7192..f30d599b 100644 --- a/src/GraphQL/FieldHelper/AssetFieldHelper.php +++ b/src/GraphQL/FieldHelper/AssetFieldHelper.php @@ -71,7 +71,8 @@ public function getAssetThumbnail(Asset $asset, string | Image\Thumbnail\Config * @param array $data * @param Asset $container * @param array $args - * @param ResolveInfo|null $resolveInfo + * @param array $context + * @param ResolveInfo $resolveInfo */ public function doExtractData(FieldNode $ast, &$data, $container, $args, $context, $resolveInfo = null) { diff --git a/src/GraphQL/FieldHelper/DataObjectFieldHelper.php b/src/GraphQL/FieldHelper/DataObjectFieldHelper.php index 1abe3615..b078fb01 100644 --- a/src/GraphQL/FieldHelper/DataObjectFieldHelper.php +++ b/src/GraphQL/FieldHelper/DataObjectFieldHelper.php @@ -144,7 +144,7 @@ public function getGraphQlOperatorConfig($mode, $nodeDef, $class, $container, $p * @param string $key * @param object|null $container * - * @return mixed + * @return Data|null */ public function getFieldDefinitionFromKey($class, $key, &$container = null) { @@ -314,7 +314,7 @@ public function getMutationFieldConfigFromConfig($nodeDef, $class) * @param ClassDefinition|\Pimcore\Model\DataObject\Fieldcollection\Definition $class * @param object $container * - * @return mixed + * @return array */ public function getGraphQlMutationFieldConfig($nodeDef, $class, $container) { @@ -351,7 +351,8 @@ public function getGraphQlTypeFromNodeConf($nodeConf, $class, $container = null) * @param array $data * @param object $container * @param array $args - * @param ResolveInfo|null $resolveInfo + * @param array $context + * @param ResolveInfo $resolveInfo */ public function doExtractData(FieldNode $ast, &$data, $container, $args, $context, $resolveInfo = null) { diff --git a/src/GraphQL/FieldHelper/DocumentFieldHelper.php b/src/GraphQL/FieldHelper/DocumentFieldHelper.php index 9328130b..51c8d903 100644 --- a/src/GraphQL/FieldHelper/DocumentFieldHelper.php +++ b/src/GraphQL/FieldHelper/DocumentFieldHelper.php @@ -27,7 +27,8 @@ class DocumentFieldHelper extends AbstractFieldHelper * @param array $data * @param Asset $container * @param array $args - * @param ResolveInfo|null $resolveInfo + * @param array $context + * @param ResolveInfo $resolveInfo */ public function doExtractData(FieldNode $ast, &$data, $container, $args, $context, $resolveInfo = null) { diff --git a/src/GraphQL/GeneralTypeFactory.php b/src/GraphQL/GeneralTypeFactory.php index c580217b..be6f2d54 100644 --- a/src/GraphQL/GeneralTypeFactory.php +++ b/src/GraphQL/GeneralTypeFactory.php @@ -30,10 +30,6 @@ class GeneralTypeFactory */ protected $className; - /** - * @param Service $graphQlService - * @param string $className - */ public function __construct(Service $graphQlService, string $className) { $this->className = $className; diff --git a/src/GraphQL/Helper.php b/src/GraphQL/Helper.php index ce7e0bd8..c357e25f 100644 --- a/src/GraphQL/Helper.php +++ b/src/GraphQL/Helper.php @@ -183,6 +183,12 @@ public static function buildSqlCondition($defaultTable, $q, $op = null, $subject return $subCondition; } + /** + * @param string $defaultTable + * @param string $columnName + * + * @return string + */ protected static function quoteAbsoluteColumnName($defaultTable, $columnName) { $db = Db::get(); diff --git a/src/GraphQL/Mutation/MutationType.php b/src/GraphQL/Mutation/MutationType.php index edfad65a..03bc572d 100644 --- a/src/GraphQL/Mutation/MutationType.php +++ b/src/GraphQL/Mutation/MutationType.php @@ -23,6 +23,7 @@ use Pimcore\Bundle\DataHubBundle\Configuration; use Pimcore\Bundle\DataHubBundle\Event\GraphQL\Model\MutationTypeEvent; use Pimcore\Bundle\DataHubBundle\Event\GraphQL\MutationEvents; +use Pimcore\Bundle\DataHubBundle\GraphQL\ElementDescriptor; use Pimcore\Bundle\DataHubBundle\GraphQL\ElementTag; use Pimcore\Bundle\DataHubBundle\GraphQL\Service; use Pimcore\Bundle\DataHubBundle\GraphQL\Traits\ElementIdentificationTrait; @@ -364,7 +365,7 @@ public function getDocumentLinkMutationInputType($context, &$processors = []) } /** - * @param mixed $value + * @param ElementDescriptor|null $value * @param array $args * @param mixed $context * @param ResolveInfo $info @@ -395,13 +396,23 @@ public static function processDocumentLinkMutationInput($value, $args, $context, } } + /** + * @param ElementDescriptor|null $value + * @param array $args + * @param mixed $context + * @param ResolveInfo $info + * @param Document\Page|Document\Email $element + * @param array $processors + * + * @return void + */ public function processDocumentEmailMutationInput($value, $args, $context, ResolveInfo $info, $element, $processors) { self::processDocumentPageMutationInput($value, $args, $context, $info, $element, $processors); } /** - * @param mixed $value + * @param ElementDescriptor|null $value * @param array $args * @param mixed $context * @param ResolveInfo $info @@ -770,6 +781,15 @@ public function buildDataObjectMutations(&$config = [], $context = []) } } + /** + * @param array $inputFields + * @param array $processors + * @param array $context + * @param string $entity + * @param ClassDefinition|\Pimcore\Model\DataObject\Fieldcollection\Definition $class + * + * @return void + */ public function generateInputFieldsAndProcessors(&$inputFields, &$processors, $context, $entity, $class) { $inputFields = []; diff --git a/src/GraphQL/Mutation/Operator/Factory/DefaultMutationOperatorFactoryBase.php b/src/GraphQL/Mutation/Operator/Factory/DefaultMutationOperatorFactoryBase.php index d720b246..ea7ffdb0 100644 --- a/src/GraphQL/Mutation/Operator/Factory/DefaultMutationOperatorFactoryBase.php +++ b/src/GraphQL/Mutation/Operator/Factory/DefaultMutationOperatorFactoryBase.php @@ -30,10 +30,6 @@ abstract class DefaultMutationOperatorFactoryBase */ protected $className; - /** - * @param Service $graphQlService - * @param string $className - */ public function __construct(Service $graphQlService, string $className) { $this->className = $className; @@ -42,7 +38,7 @@ public function __construct(Service $graphQlService, string $className) /** * @param array $configElement - * @param mixed $context + * @param array|null $context * * @return OperatorInterface */ diff --git a/src/GraphQL/PropertyType/CheckboxType.php b/src/GraphQL/PropertyType/CheckboxType.php index bf85ecea..5440adde 100644 --- a/src/GraphQL/PropertyType/CheckboxType.php +++ b/src/GraphQL/PropertyType/CheckboxType.php @@ -27,9 +27,6 @@ class CheckboxType extends ObjectType { use ServiceTrait; - /** - * @param Service $graphQlService - */ public function __construct(Service $graphQlService) { $this->graphQlService = $graphQlService; diff --git a/src/GraphQL/PropertyType/DataObjectType.php b/src/GraphQL/PropertyType/DataObjectType.php index 239c2f29..9922438d 100644 --- a/src/GraphQL/PropertyType/DataObjectType.php +++ b/src/GraphQL/PropertyType/DataObjectType.php @@ -29,10 +29,6 @@ class DataObjectType extends ObjectType { use ServiceTrait; - /** - * @param Service $graphQlService - * @param ObjectsType $objectUnionType - */ public function __construct(Service $graphQlService, ObjectsType $objectUnionType) { $this->graphQlService = $graphQlService; diff --git a/src/GraphQL/PropertyType/ObjectsType.php b/src/GraphQL/PropertyType/ObjectsType.php index 0328a04e..44407760 100644 --- a/src/GraphQL/PropertyType/ObjectsType.php +++ b/src/GraphQL/PropertyType/ObjectsType.php @@ -30,9 +30,6 @@ class ObjectsType extends UnionType implements ContainerAwareInterface use ServiceTrait; - /** - * @param Service $graphQlService - */ public function __construct(Service $graphQlService) { $this->setGraphQLService($graphQlService); diff --git a/src/GraphQL/PropertyType/SelectType.php b/src/GraphQL/PropertyType/SelectType.php index c1f05c25..f88aa8da 100644 --- a/src/GraphQL/PropertyType/SelectType.php +++ b/src/GraphQL/PropertyType/SelectType.php @@ -26,9 +26,6 @@ class SelectType extends ObjectType { use ServiceTrait; - /** - * @param Service $graphQlService - */ public function __construct(Service $graphQlService) { $this->graphQlService = $graphQlService; diff --git a/src/GraphQL/PropertyType/TextType.php b/src/GraphQL/PropertyType/TextType.php index b70b8820..8e32894c 100644 --- a/src/GraphQL/PropertyType/TextType.php +++ b/src/GraphQL/PropertyType/TextType.php @@ -27,9 +27,6 @@ class TextType extends ObjectType { use ServiceTrait; - /** - * @param Service $graphQlService - */ public function __construct(Service $graphQlService) { $this->graphQlService = $graphQlService; diff --git a/src/GraphQL/PropertyType/TextareaType.php b/src/GraphQL/PropertyType/TextareaType.php index 757c4f4b..74578a3a 100644 --- a/src/GraphQL/PropertyType/TextareaType.php +++ b/src/GraphQL/PropertyType/TextareaType.php @@ -27,9 +27,6 @@ class TextareaType extends ObjectType { use ServiceTrait; - /** - * @param Service $graphQlService - */ public function __construct(Service $graphQlService) { $this->graphQlService = $graphQlService; diff --git a/src/GraphQL/Query/Operator/AbstractOperator.php b/src/GraphQL/Query/Operator/AbstractOperator.php index bbda99a7..9a654068 100644 --- a/src/GraphQL/Query/Operator/AbstractOperator.php +++ b/src/GraphQL/Query/Operator/AbstractOperator.php @@ -28,7 +28,7 @@ abstract class AbstractOperator implements OperatorInterface protected $label; /** - * @var mixed + * @var array */ protected $context; @@ -37,6 +37,10 @@ abstract class AbstractOperator implements OperatorInterface */ protected $children; + /** + * @param array $config + * @param array|null $context + */ public function __construct(array $config = [], $context = null) { $this->label = $config['label']; @@ -60,21 +64,37 @@ public function expandLocales() return false; } + /** + * @return array|null + */ public function getContext() { return $this->context; } + /** + * @param array $context + * + * @return void + */ public function setContext($context) { $this->context = $context; } + /** + * @return string + */ public function getLabel() { return $this->label; } + /** + * @param string $label + * + * @return void + */ public function setLabel($label) { $this->label = $label; diff --git a/src/GraphQL/Query/Operator/Alias.php b/src/GraphQL/Query/Operator/Alias.php index 8e5dad86..6f2cea77 100644 --- a/src/GraphQL/Query/Operator/Alias.php +++ b/src/GraphQL/Query/Operator/Alias.php @@ -16,9 +16,18 @@ namespace Pimcore\Bundle\DataHubBundle\GraphQL\Query\Operator; use GraphQL\Type\Definition\ResolveInfo; +use Pimcore\Model\Element\ElementInterface; class Alias extends AbstractOperator { + /** + * @param ElementInterface|null $element + * @param ResolveInfo|null $resolveInfo + * + * @return \stdClass + * + * @throws \Exception + */ public function getLabeledValue($element, ResolveInfo $resolveInfo = null) { $result = new \stdClass(); diff --git a/src/GraphQL/Query/Operator/Concatenator.php b/src/GraphQL/Query/Operator/Concatenator.php index 3d4545ff..fe67c614 100644 --- a/src/GraphQL/Query/Operator/Concatenator.php +++ b/src/GraphQL/Query/Operator/Concatenator.php @@ -16,12 +16,17 @@ namespace Pimcore\Bundle\DataHubBundle\GraphQL\Query\Operator; use GraphQL\Type\Definition\ResolveInfo; +use Pimcore\Model\Element\ElementInterface; class Concatenator extends AbstractOperator { private $glue; private $forceValue; + /** + * @param array $config + * @param array|null $context + */ public function __construct(array $config, $context = null) { parent::__construct($config, $context); @@ -30,6 +35,14 @@ public function __construct(array $config, $context = null) $this->forceValue = $config['forceValue'] ?? false; } + /** + * @param ElementInterface|null $element + * @param ResolveInfo|null $resolveInfo + * + * @return \stdClass + * + * @throws \Exception + */ public function getLabeledValue($element, ResolveInfo $resolveInfo = null) { $result = new \stdClass(); diff --git a/src/GraphQL/Query/Operator/DateFormatter.php b/src/GraphQL/Query/Operator/DateFormatter.php index 127a4404..625f345e 100644 --- a/src/GraphQL/Query/Operator/DateFormatter.php +++ b/src/GraphQL/Query/Operator/DateFormatter.php @@ -17,6 +17,7 @@ use Carbon\Carbon; use GraphQL\Type\Definition\ResolveInfo; +use Pimcore\Model\Element\ElementInterface; class DateFormatter extends AbstractOperator { @@ -25,6 +26,10 @@ class DateFormatter extends AbstractOperator */ private $format; + /** + * @param array $config + * @param array|null $context + */ public function __construct(array $config, $context = null) { parent::__construct($config, $context); @@ -32,6 +37,14 @@ public function __construct(array $config, $context = null) $this->format = ($config['format'] ? $config['format'] : null); } + /** + * @param ElementInterface|null $element + * @param ResolveInfo|null $resolveInfo + * + * @return \stdClass + * + * @throws \Exception + */ public function getLabeledValue($element, ResolveInfo $resolveInfo = null) { $result = new \stdClass(); @@ -56,6 +69,11 @@ public function getLabeledValue($element, ResolveInfo $resolveInfo = null) return $result; } + /** + * @param int|Carbon $theValue + * + * @return Carbon|int|string + */ public function format($theValue) { if ($theValue) { diff --git a/src/GraphQL/Query/Operator/ElementCounter.php b/src/GraphQL/Query/Operator/ElementCounter.php index c49970dd..910385b3 100644 --- a/src/GraphQL/Query/Operator/ElementCounter.php +++ b/src/GraphQL/Query/Operator/ElementCounter.php @@ -16,11 +16,16 @@ namespace Pimcore\Bundle\DataHubBundle\GraphQL\Query\Operator; use GraphQL\Type\Definition\ResolveInfo; +use Pimcore\Model\Element\ElementInterface; class ElementCounter extends AbstractOperator { private $countEmpty; + /** + * @param array $config + * @param array|null $context + */ public function __construct(array $config, $context = null) { parent::__construct($config, $context); @@ -28,6 +33,14 @@ public function __construct(array $config, $context = null) $this->countEmpty = $config['countEmpty']; } + /** + * @param ElementInterface|null $element + * @param ResolveInfo|null $resolveInfo + * + * @return \stdClass + * + * @throws \Exception + */ public function getLabeledValue($element, ResolveInfo $resolveInfo = null) { $result = new \stdClass(); diff --git a/src/GraphQL/Query/Operator/Factory/DefaultOperatorFactoryBase.php b/src/GraphQL/Query/Operator/Factory/DefaultOperatorFactoryBase.php index 9542456f..ada63228 100644 --- a/src/GraphQL/Query/Operator/Factory/DefaultOperatorFactoryBase.php +++ b/src/GraphQL/Query/Operator/Factory/DefaultOperatorFactoryBase.php @@ -30,9 +30,6 @@ abstract class DefaultOperatorFactoryBase implements OperatorFactoryInterface */ protected $className; - /** - * @param string $className - */ public function __construct(Service $graphQlService, string $className) { $this->className = $className; @@ -41,7 +38,7 @@ public function __construct(Service $graphQlService, string $className) /** * @param array $configElement - * @param mixed $context + * @param array|null $context * * @return OperatorInterface */ diff --git a/src/GraphQL/Query/Operator/Factory/OperatorFactoryInterface.php b/src/GraphQL/Query/Operator/Factory/OperatorFactoryInterface.php index 18d4acb2..b4ff8fc1 100644 --- a/src/GraphQL/Query/Operator/Factory/OperatorFactoryInterface.php +++ b/src/GraphQL/Query/Operator/Factory/OperatorFactoryInterface.php @@ -23,7 +23,7 @@ interface OperatorFactoryInterface { /** * @param array $configElement - * @param mixed $context + * @param array|null $context * * @return OperatorInterface */ diff --git a/src/GraphQL/Query/Operator/Merge.php b/src/GraphQL/Query/Operator/Merge.php index 15bc48b3..96ee7a42 100644 --- a/src/GraphQL/Query/Operator/Merge.php +++ b/src/GraphQL/Query/Operator/Merge.php @@ -16,12 +16,17 @@ namespace Pimcore\Bundle\DataHubBundle\GraphQL\Query\Operator; use GraphQL\Type\Definition\ResolveInfo; +use Pimcore\Model\Element\ElementInterface; class Merge extends AbstractOperator { private $flatten = true; private $unique; + /** + * @param array $config + * @param array|null $context + */ public function __construct(array $config, $context = null) { parent::__construct($config, $context); @@ -29,6 +34,14 @@ public function __construct(array $config, $context = null) $this->unique = $config['unique']; } + /** + * @param ElementInterface|null $element + * @param ResolveInfo|null $resolveInfo + * + * @return \stdClass + * + * @throws \Exception + */ public function getLabeledValue($element, ResolveInfo $resolveInfo = null) { $result = new \stdClass(); @@ -74,7 +87,7 @@ public function getLabeledValue($element, ResolveInfo $resolveInfo = null) } /** - * @return mixed + * @return bool */ public function getFlatten() { diff --git a/src/GraphQL/Query/Operator/Substring.php b/src/GraphQL/Query/Operator/Substring.php index 32e98106..3413ed47 100644 --- a/src/GraphQL/Query/Operator/Substring.php +++ b/src/GraphQL/Query/Operator/Substring.php @@ -16,6 +16,7 @@ namespace Pimcore\Bundle\DataHubBundle\GraphQL\Query\Operator; use GraphQL\Type\Definition\ResolveInfo; +use Pimcore\Model\Element\ElementInterface; class Substring extends AbstractOperator { @@ -25,6 +26,10 @@ class Substring extends AbstractOperator private $ellipses; + /** + * @param array $config + * @param array|null $context + */ public function __construct(array $config = [], $context = null) { parent::__construct($config, $context); @@ -34,6 +39,14 @@ public function __construct(array $config = [], $context = null) $this->ellipses = $config['ellipses']; } + /** + * @param ElementInterface|null $element + * @param ResolveInfo|null $resolveInfo + * + * @return \stdClass + * + * @throws \Exception + */ public function getLabeledValue($element, ResolveInfo $resolveInfo = null) { $result = new \stdClass(); diff --git a/src/GraphQL/Query/Operator/Text.php b/src/GraphQL/Query/Operator/Text.php index fd4b1ecb..ee67edec 100644 --- a/src/GraphQL/Query/Operator/Text.php +++ b/src/GraphQL/Query/Operator/Text.php @@ -16,14 +16,25 @@ namespace Pimcore\Bundle\DataHubBundle\GraphQL\Query\Operator; use GraphQL\Type\Definition\ResolveInfo; +use Pimcore\Model\Element\ElementInterface; class Text extends AbstractOperator { + /** + * @param array $config + * @param array|null $context + */ public function __construct(array $config, $context = null) { parent::__construct($config, $context); } + /** + * @param ElementInterface|null $element + * @param ResolveInfo|null $resolveInfo + * + * @return \stdClass + */ public function getLabeledValue($element, ResolveInfo $resolveInfo = null) { $result = new \stdClass(); diff --git a/src/GraphQL/Query/Operator/Thumbnail.php b/src/GraphQL/Query/Operator/Thumbnail.php index 4911cd33..08a26f93 100644 --- a/src/GraphQL/Query/Operator/Thumbnail.php +++ b/src/GraphQL/Query/Operator/Thumbnail.php @@ -25,7 +25,7 @@ class Thumbnail extends AbstractOperator /** * @param array $config - * @param mixed $context + * @param array|null $context */ public function __construct(array $config = [], $context = null) { diff --git a/src/GraphQL/Query/Operator/ThumbnailHtml.php b/src/GraphQL/Query/Operator/ThumbnailHtml.php index 193773bc..d540b809 100644 --- a/src/GraphQL/Query/Operator/ThumbnailHtml.php +++ b/src/GraphQL/Query/Operator/ThumbnailHtml.php @@ -18,6 +18,7 @@ use GraphQL\Type\Definition\ResolveInfo; use Pimcore\Model\Asset; +use Pimcore\Model\Element\ElementInterface; /** * Class ThumbnailHtml @@ -33,7 +34,7 @@ class ThumbnailHtml extends AbstractOperator /** * @param array $config - * @param mixed $context + * @param array|null $context */ public function __construct(array $config = [], $context = null) { @@ -43,7 +44,7 @@ public function __construct(array $config = [], $context = null) } /** - * @param \Pimcore\Model\Element\ElementInterface $element + * @param ElementInterface|null $element * @param ResolveInfo|null $resolveInfo * * @return \stdClass|null diff --git a/src/GraphQL/Query/Operator/TranslateValue.php b/src/GraphQL/Query/Operator/TranslateValue.php index a0238d06..8b2a34fa 100644 --- a/src/GraphQL/Query/Operator/TranslateValue.php +++ b/src/GraphQL/Query/Operator/TranslateValue.php @@ -16,11 +16,16 @@ namespace Pimcore\Bundle\DataHubBundle\GraphQL\Query\Operator; use GraphQL\Type\Definition\ResolveInfo; +use Pimcore\Model\Element\ElementInterface; class TranslateValue extends AbstractOperator { private $prefix; + /** + * @param array $config + * @param array|null $context + */ public function __construct(array $config = [], $context = null) { //TODO use translator factory from grid config @@ -29,6 +34,14 @@ public function __construct(array $config = [], $context = null) $this->prefix = $config['prefix']; } + /** + * @param ElementInterface|null $element + * @param ResolveInfo|null $resolveInfo + * + * @return \stdClass|null + * + * @throws \Exception + */ public function getLabeledValue($element, ResolveInfo $resolveInfo = null) { $result = new \stdClass(); diff --git a/src/GraphQL/Query/Operator/Trimmer.php b/src/GraphQL/Query/Operator/Trimmer.php index 1f71c649..b2d4ab5d 100644 --- a/src/GraphQL/Query/Operator/Trimmer.php +++ b/src/GraphQL/Query/Operator/Trimmer.php @@ -16,6 +16,7 @@ namespace Pimcore\Bundle\DataHubBundle\GraphQL\Query\Operator; use GraphQL\Type\Definition\ResolveInfo; +use Pimcore\Model\Element\ElementInterface; class Trimmer extends AbstractOperator { @@ -25,6 +26,10 @@ class Trimmer extends AbstractOperator private $trim; + /** + * @param array $config + * @param array|null $context + */ public function __construct(array $config, $context = null) { parent::__construct($config, $context); @@ -32,6 +37,14 @@ public function __construct(array $config, $context = null) $this->trim = $config['trim']; } + /** + * @param ElementInterface|null $element + * @param ResolveInfo|null $resolveInfo + * + * @return \stdClass + * + * @throws \Exception + */ public function getLabeledValue($element, ResolveInfo $resolveInfo = null) { $result = new \stdClass(); diff --git a/src/GraphQL/Query/QueryType.php b/src/GraphQL/Query/QueryType.php index a8d4ea2f..07a9e081 100644 --- a/src/GraphQL/Query/QueryType.php +++ b/src/GraphQL/Query/QueryType.php @@ -57,6 +57,7 @@ class QueryType extends ObjectType * @param Service $graphQlService * @param LocaleServiceInterface $localeService * @param Factory $modelFactory + * @param EventDispatcherInterface $eventDispatcher * @param array $config * @param array $context * diff --git a/src/GraphQL/Query/Value/AbstractValue.php b/src/GraphQL/Query/Value/AbstractValue.php index ec93aea5..6a9c7019 100644 --- a/src/GraphQL/Query/Value/AbstractValue.php +++ b/src/GraphQL/Query/Value/AbstractValue.php @@ -43,7 +43,7 @@ abstract class AbstractValue implements ValueInterface /** * @param array $config - * @param mixed $context + * @param array|null $context */ public function __construct($config, $context = null) { diff --git a/src/GraphQL/Resolver/AssetListing.php b/src/GraphQL/Resolver/AssetListing.php index 3c538c89..cd395601 100644 --- a/src/GraphQL/Resolver/AssetListing.php +++ b/src/GraphQL/Resolver/AssetListing.php @@ -37,10 +37,6 @@ class AssetListing /** @var EventDispatcherInterface */ protected $eventDispatcher; - /** - * @param Service $graphQlService - * @param EventDispatcherInterface $eventDispatcher - */ public function __construct(Service $graphQlService, EventDispatcherInterface $eventDispatcher) { $this->setGraphQLService($graphQlService); @@ -49,7 +45,7 @@ public function __construct(Service $graphQlService, EventDispatcherInterface $e } /** - * @param mixed $value + * @param ElementDescriptor $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo @@ -62,12 +58,12 @@ public function resolveEdges($value = null, $args = [], $context = [], ResolveIn } /** - * @param mixed $value + * @param ElementDescriptor $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo * - * @return mixed + * @return ElementDescriptor|null */ public function resolveEdge($value = null, $args = [], $context = [], ResolveInfo $resolveInfo = null) { @@ -209,7 +205,7 @@ static function ($fullpath) use ($db) { } /** - * @param mixed $value + * @param ElementDescriptor $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo @@ -249,7 +245,7 @@ protected function extractMultipleElements($elements, $args, $context, $resolveI * @param array $context * @param ResolveInfo|null $resolveInfo * - * @return array|null + * @return ElementDescriptor|null * * @throws \Exception */ diff --git a/src/GraphQL/Resolver/AssetType.php b/src/GraphQL/Resolver/AssetType.php index e78dde05..4b833e92 100644 --- a/src/GraphQL/Resolver/AssetType.php +++ b/src/GraphQL/Resolver/AssetType.php @@ -27,7 +27,7 @@ class AssetType use ServiceTrait, ElementTagTrait; /** - * @param array|null $value + * @param ElementDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo @@ -51,7 +51,7 @@ public function resolveTag($value = null, $args = [], $context = [], ResolveInfo } /** - * @param array|null $value + * @param ElementDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo @@ -100,7 +100,7 @@ public function resolveMetadata($value = null, $args = [], $context = [], Resolv } /** - * @param mixed $value + * @param ElementDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo @@ -124,7 +124,7 @@ public function resolvePath($value = null, $args = [], $context = [], ResolveInf } /** - * @param mixed $value + * @param ElementDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo @@ -149,7 +149,7 @@ public function resolveData($value = null, $args = [], $context = [], ResolveInf } /** - * @param mixed $value + * @param ElementDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo @@ -185,7 +185,7 @@ public function resolveSrcSet($value = null, $args = [], $context = [], ResolveI } /** - * @param mixed $value + * @param ElementDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo @@ -251,7 +251,7 @@ public function resolveResolutions($value = null, $args = [], $context = [], Res } /** - * @param mixed $value + * @param ElementDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo @@ -292,7 +292,7 @@ public function resolveDimensions($value = null, $args = [], $context = [], Reso } /** - * @param mixed $value + * @param ElementDescriptor $value * @param array $context * * @return Asset|null diff --git a/src/GraphQL/Resolver/Base.php b/src/GraphQL/Resolver/Base.php index 865a1615..43b881aa 100644 --- a/src/GraphQL/Resolver/Base.php +++ b/src/GraphQL/Resolver/Base.php @@ -50,6 +50,14 @@ public function __construct($typeName, $attributes, $class, $container) $this->container = $container; } + /** + * @param array $value + * @param array $args + * @param array $context + * @param ResolveInfo|null $resolveInfo + * + * @return \stdClass + */ public function resolve($value = null, $args = [], $context = [], ResolveInfo $resolveInfo = null) { /** @var \Pimcore\Bundle\DataHubBundle\GraphQL\Query\Operator\AbstractOperator $operatorImpl */ diff --git a/src/GraphQL/Resolver/HotspotType.php b/src/GraphQL/Resolver/HotspotType.php index 8ff873a1..721654b8 100644 --- a/src/GraphQL/Resolver/HotspotType.php +++ b/src/GraphQL/Resolver/HotspotType.php @@ -33,7 +33,7 @@ class HotspotType use ServiceTrait; /** - * @param mixed $value + * @param ElementDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo @@ -61,7 +61,7 @@ public function resolveImage($value = null, $args = [], $context = [], ResolveIn } /** - * @param mixed $value + * @param ElementDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo @@ -76,7 +76,7 @@ public function resolveCrop($value = null, $args = [], $context = [], ResolveInf } /** - * @param mixed $value + * @param ElementDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo @@ -91,7 +91,7 @@ public function resolveHotspots($value = null, $args = [], $context = [], Resolv } /** - * @param mixed $value + * @param ElementDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo @@ -106,7 +106,7 @@ public function resolveMarker($value = null, $args = [], $context = [], ResolveI } /** - * @param mixed $value + * @param array $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo diff --git a/src/GraphQL/Resolver/QueryType.php b/src/GraphQL/Resolver/QueryType.php index 8f37739c..69c93de8 100644 --- a/src/GraphQL/Resolver/QueryType.php +++ b/src/GraphQL/Resolver/QueryType.php @@ -71,7 +71,7 @@ public function __construct(EventDispatcherInterface $eventDispatcher, $class = } /** - * @param mixed $value + * @param ElementDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo @@ -107,7 +107,7 @@ public function resolveFolderGetter($value = null, $args = [], $context = [], Re } /** - * @param mixed $value + * @param ElementDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo @@ -122,7 +122,7 @@ public function resolveAssetFolderGetter($value = null, $args = [], $context = [ } /** - * @param mixed $value + * @param ElementDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo @@ -137,7 +137,7 @@ public function resolveDocumentFolderGetter($value = null, $args = [], $context } /** - * @param mixed $value + * @param ElementDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo @@ -154,7 +154,7 @@ public function resolveObjectFolderGetter($value = null, $args = [], $context = /** * @deprecated args['path'] will no longer be supported by Release 1.0. Use args['fullpath'] instead. * - * @param mixed $value + * @param ElementDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo @@ -195,7 +195,7 @@ public function resolveDocumentGetter($value = null, $args = [], $context = [], } /** - * @param mixed $value + * @param ElementDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo @@ -258,7 +258,7 @@ public function resolveTranslationGetter(mixed $value = null, array $args = [], } /** - * @param mixed $value + * @param ElementDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo @@ -381,7 +381,7 @@ public function resolveEdges($value = null, $args = [], $context = [], ResolveIn } /** - * @param mixed $value + * @param ElementDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo @@ -514,7 +514,7 @@ static function ($fullpath) use ($db) { } /** - * @param mixed $value + * @param ElementDescriptor|null $value * @param array $args * @param array $context * @param ResolveInfo|null $resolveInfo @@ -526,6 +526,13 @@ public function resolveListingTotalCount($value = null, $args = [], $context = [ return $value['totalCount'](); } + /** + * @param bool $isFullpathSet + * @param bool $isIdSet + * @param array $args + * + * @return string + */ private function createArgumentErrorMessage($isFullpathSet, $isIdSet, $args) { if ($isIdSet && $isFullpathSet) { diff --git a/src/GraphQL/Service.php b/src/GraphQL/Service.php index 0c331b18..109a1129 100644 --- a/src/GraphQL/Service.php +++ b/src/GraphQL/Service.php @@ -195,23 +195,6 @@ class Service */ protected $dataObjectDataTypes = []; - /** - * @param AssetFieldHelper $assetFieldHelper - * @param DocumentFieldHelper $documentFieldHelper - * @param DataObjectFieldHelper $objectFieldHelper - * @param LocaleServiceInterface $localeService - * @param Factory $modelFactory - * @param Translator $translator - * @param ContainerInterface $dataObjectQueryTypeGeneratorFactories - * @param ContainerInterface $dataObjectQueryOperatorFactories - * @param ContainerInterface $dataObjectMutationTypeGeneratorFactories - * @param ContainerInterface $dataObjectMutationOperatorFactories - * @param ContainerInterface $documentElementQueryTypeGeneratorFactories - * @param ContainerInterface $documentElementMutationTypeGeneratorFactories - * @param ContainerInterface $generalTypeGeneratorFactories - * @param ContainerInterface $assetTypeGeneratorFactories - * @param ContainerInterface $csFeatureTypeGeneratorFactories - */ public function __construct( AssetFieldHelper $assetFieldHelper, DocumentFieldHelper $documentFieldHelper, @@ -271,7 +254,7 @@ public function buildDataObjectQueryDataConfig($attribute, $typeName, $fieldDefi * @param ClassDefinition|\Pimcore\Model\DataObject\Fieldcollection\Definition $class * @param object|null $container * - * @return mixed + * @return array */ public function buildDataObjectMutationDataConfig($nodeDef, $class = null, $container = null) { @@ -486,7 +469,7 @@ public function buildTranslationType(string $typeName): mixed * @param ClassDefinition|null $class * @param object|null $container * - * @return mixed + * @return Query\Operator\OperatorInterface */ public function buildQueryOperator($typeName, $attributes = null, ClassDefinition $class = null, $container = null) { @@ -503,7 +486,7 @@ public function buildQueryOperator($typeName, $attributes = null, ClassDefinitio /** * @param ConfigElementInterface $nodeConfig * - * @return mixed|DefaultValue + * @return DefaultValue|Query\Operator\OperatorInterface * * @throws \Exception */ @@ -596,17 +579,11 @@ public function setSupportedDataObjectQueryDataTypes($supportedDataObjectQueryDa $this->supportedDataObjectQueryDataTypes = $supportedDataObjectQueryDataTypes; } - /** - * @return array - */ public function getSupportedDataObjectMutationDataTypes(): array { return $this->supportedDataObjectMutationDataTypes; } - /** - * @param array $supportedDataObjectMutationDataTypes - */ public function setSupportedDataObjectMutationDataTypes(array $supportedDataObjectMutationDataTypes): void { $this->supportedDataObjectMutationDataTypes = $supportedDataObjectMutationDataTypes; @@ -653,33 +630,21 @@ public function getObjectFieldHelper() return $this->objectFieldHelper; } - /** - * @return ContainerInterface - */ public function getQueryTypeGeneratorFactories(): ContainerInterface { return $this->dataObjectQueryTypeGeneratorFactories; } - /** - * @return ContainerInterface - */ public function getQueryOperatorFactories(): ContainerInterface { return $this->dataObjectQueryOperatorFactories; } - /** - * @return LocaleServiceInterface - */ public function getLocaleService(): LocaleServiceInterface { return $this->localeService; } - /** - * @return Factory - */ public function getModelFactory(): Factory { return $this->modelFactory; @@ -1141,41 +1106,26 @@ private static function isLocalizedField($container, $fieldName): bool return false; } - /** - * @return ContainerInterface - */ public function getDataObjectMutationTypeGeneratorFactories(): ContainerInterface { return $this->dataObjectMutationTypeGeneratorFactories; } - /** - * @param ContainerInterface $dataObjectMutationTypeGeneratorFactories - */ public function setDataObjectMutationTypeGeneratorFactories(ContainerInterface $dataObjectMutationTypeGeneratorFactories): void { $this->dataObjectMutationTypeGeneratorFactories = $dataObjectMutationTypeGeneratorFactories; } - /** - * @return ContainerInterface - */ public function getDataObjectMutationOperatorFactories(): ContainerInterface { return $this->dataObjectMutationOperatorFactories; } - /** - * @param ContainerInterface $dataObjectMutationOperatorFactories - */ public function setDataObjectMutationOperatorFactories(ContainerInterface $dataObjectMutationOperatorFactories): void { $this->dataObjectMutationOperatorFactories = $dataObjectMutationOperatorFactories; } - /** - * @return array - */ public function getDataObjectDataTypes(): array { return $this->dataObjectDataTypes; diff --git a/src/GraphQL/SharedType/KeyValueType.php b/src/GraphQL/SharedType/KeyValueType.php index 15ec47c4..da294049 100644 --- a/src/GraphQL/SharedType/KeyValueType.php +++ b/src/GraphQL/SharedType/KeyValueType.php @@ -45,6 +45,11 @@ public static function getInstance() return self::$instance; } + /** + * @param array|null $value + * + * @return array + */ public static function resolveAssociativeArray(?array $value) { if (null === $value) { diff --git a/src/GraphQL/Traits/ElementIdentificationTrait.php b/src/GraphQL/Traits/ElementIdentificationTrait.php index 0c8b8310..084a82f3 100644 --- a/src/GraphQL/Traits/ElementIdentificationTrait.php +++ b/src/GraphQL/Traits/ElementIdentificationTrait.php @@ -80,6 +80,13 @@ protected function getElementByPath($type, $fullpath) return Service::getElementByPath($type, $fullpath); } + /** + * @param array $value + * + * @return mixed + * + * @throws ClientSafeException + */ private function getType($value) { if (!isset($value[$this->typeKey])) { diff --git a/src/GraphQL/Traits/PermissionInfoTrait.php b/src/GraphQL/Traits/PermissionInfoTrait.php index 723e0fda..f7803b58 100644 --- a/src/GraphQL/Traits/PermissionInfoTrait.php +++ b/src/GraphQL/Traits/PermissionInfoTrait.php @@ -30,9 +30,6 @@ public function getOmitPermissionCheck() return $this->omitPermissionCheck; } - /** - * @param bool $omitPermissionCheck - */ public function setOmitPermissionCheck(bool $omitPermissionCheck) { $this->omitPermissionCheck = $omitPermissionCheck; diff --git a/src/GraphQL/Traits/ServiceTrait.php b/src/GraphQL/Traits/ServiceTrait.php index 3d8e64f9..2b854b37 100644 --- a/src/GraphQL/Traits/ServiceTrait.php +++ b/src/GraphQL/Traits/ServiceTrait.php @@ -34,9 +34,6 @@ public function getGraphQlService() return $this->graphQlService; } - /** - * @param Service $graphQlService - */ public function setGraphQLService(Service $graphQlService) { $this->graphQlService = $graphQlService; diff --git a/src/GraphQL/TypeInterface/Property.php b/src/GraphQL/TypeInterface/Property.php index 7d65889f..7b684fa0 100644 --- a/src/GraphQL/TypeInterface/Property.php +++ b/src/GraphQL/TypeInterface/Property.php @@ -22,6 +22,9 @@ class Property { public static $instance; + /** + * @return InterfaceType + */ public static function getInstance() { if (!self::$instance) { diff --git a/src/Installer.php b/src/Installer.php index f597849e..dd801c48 100644 --- a/src/Installer.php +++ b/src/Installer.php @@ -15,6 +15,7 @@ namespace Pimcore\Bundle\DataHubBundle; +use Doctrine\DBAL\Exception; use Pimcore\Bundle\DataHubBundle\Controller\ConfigController; use Pimcore\Bundle\DataHubBundle\Migrations\PimcoreX\Version20210305134111; use Pimcore\Db; @@ -74,6 +75,11 @@ public function install() return true; } + /** + * @return bool + * + * @throws Exception + */ public function isInstalled() { // When switching to SettingsStoreAwareInstaller, we need to explicitly mark this bundle installed, if Settingstore entry doesn't exists and datahub permission is installed diff --git a/src/Migrations/PimcoreX/Version20210305134111.php b/src/Migrations/PimcoreX/Version20210305134111.php index 4c296868..bd19f261 100644 --- a/src/Migrations/PimcoreX/Version20210305134111.php +++ b/src/Migrations/PimcoreX/Version20210305134111.php @@ -29,23 +29,20 @@ protected function getBundleName(): string return 'PimcoreDataHubBundle'; } + /** + * @return bool + */ protected function checkBundleInstalled() { //need to always return true here, as the migration is setting the bundle installed return true; } - /** - * @param Schema $schema - */ public function up(Schema $schema): void { SettingsStore::set('BUNDLE_INSTALLED__Pimcore\\Bundle\\DataHubBundle\\PimcoreDataHubBundle', true, 'bool', 'pimcore'); } - /** - * @param Schema $schema - */ public function down(Schema $schema): void { // nothing to do diff --git a/src/Model/SpecialEntitySetting.php b/src/Model/SpecialEntitySetting.php index 9dd7b1e9..a83ea0c4 100644 --- a/src/Model/SpecialEntitySetting.php +++ b/src/Model/SpecialEntitySetting.php @@ -71,6 +71,9 @@ public function jsonSerialize() ]; } + /** + * @return string + */ public function getName() { return $this->name; diff --git a/src/MySafeException.php b/src/MySafeException.php index 3d71423f..5f08e34c 100644 --- a/src/MySafeException.php +++ b/src/MySafeException.php @@ -45,7 +45,7 @@ public function isClientSafe() } /** - * @return null|string + * @return string */ public function getCategory() { diff --git a/src/PimcoreDataHubBundle.php b/src/PimcoreDataHubBundle.php index 720adc47..f9a0673f 100644 --- a/src/PimcoreDataHubBundle.php +++ b/src/PimcoreDataHubBundle.php @@ -110,7 +110,7 @@ public function getInstaller() } /** - * @return mixed + * @return int */ public static function getNotAllowedPolicy() { diff --git a/src/Service/CheckConsumerPermissionsService.php b/src/Service/CheckConsumerPermissionsService.php index f7917d5b..34e2bbfd 100644 --- a/src/Service/CheckConsumerPermissionsService.php +++ b/src/Service/CheckConsumerPermissionsService.php @@ -22,12 +22,6 @@ class CheckConsumerPermissionsService { public const TOKEN_HEADER = 'X-API-Key'; - /** - * @param Request $request - * @param Configuration $configuration - * - * @return bool - */ public function performSecurityCheck(Request $request, Configuration $configuration): bool { $securityConfig = $configuration->getSecurityConfig(); diff --git a/src/Service/FileUploadService.php b/src/Service/FileUploadService.php index 3c5f0dbe..a0b29bff 100644 --- a/src/Service/FileUploadService.php +++ b/src/Service/FileUploadService.php @@ -65,7 +65,6 @@ public function parseUploadedFiles(Request $request): array * * @param \Symfony\Component\HttpFoundation\Request $request * - * @throws \GraphQL\Server\RequestError */ protected function validateParsedBody(Request $request): void { diff --git a/src/Service/OutputCacheService.php b/src/Service/OutputCacheService.php index 5e91ff74..0f07af8b 100644 --- a/src/Service/OutputCacheService.php +++ b/src/Service/OutputCacheService.php @@ -43,10 +43,6 @@ class OutputCacheService */ public $eventDispatcher; - /** - * @param ContainerInterface $container - * @param EventDispatcherInterface $eventDispatcher - */ public function __construct(ContainerInterface $container, EventDispatcherInterface $eventDispatcher) { $this->eventDispatcher = $eventDispatcher; @@ -64,6 +60,11 @@ public function __construct(ContainerInterface $container, EventDispatcherInterf } } + /** + * @param Request $request + * + * @return mixed + */ public function load(Request $request) { if (!$this->useCache($request)) { @@ -75,6 +76,13 @@ public function load(Request $request) return $this->loadFromCache($cacheKey); } + /** + * @param Request $request + * @param JsonResponse $response + * @param array $extraTags + * + * @return void + */ public function save(Request $request, JsonResponse $response, $extraTags = []): void { if ($this->useCache($request)) { @@ -89,11 +97,23 @@ public function save(Request $request, JsonResponse $response, $extraTags = []): } } + /** + * @param string $key + * + * @return mixed + */ protected function loadFromCache($key) { return \Pimcore\Cache::load($key); } + /** + * @param string $key + * @param mixed $item + * @param array $tags + * + * @return void + */ protected function saveToCache($key, $item, $tags = []): void { \Pimcore\Cache::save($item, $key, $tags, $this->lifetime); diff --git a/tests/GraphQL/Traits/ElementIdentificationTraitTest.php b/tests/GraphQL/Traits/ElementIdentificationTraitTest.php index 9b153ee6..45a710d6 100644 --- a/tests/GraphQL/Traits/ElementIdentificationTraitTest.php +++ b/tests/GraphQL/Traits/ElementIdentificationTraitTest.php @@ -27,11 +27,19 @@ class TestTrait const BY_ID = "ById"; const BY_PATH = "ByPath"; + /** + * @param string $elementType + * @return string + */ protected function getElementById($elementType) { return $elementType . self::BY_ID; } + /** + * @param string $elementType + * @return string + */ protected function getElementByPath($elementType) { return $elementType . self::BY_PATH; diff --git a/tests/_support/Helper/Model.php b/tests/_support/Helper/Model.php index 660daebf..cb343203 100644 --- a/tests/_support/Helper/Model.php +++ b/tests/_support/Helper/Model.php @@ -5,6 +5,7 @@ // here you can define custom actions // all public methods declared in helper class will be available in $I +use Doctrine\DBAL\Exception; use Pimcore\Bundle\DataHubBundle\Installer; use Pimcore\Tests\Helper\AbstractDefinitionHelper; use Pimcore\Tests\Helper\Pimcore; @@ -14,6 +15,11 @@ class Model extends AbstractDefinitionHelper { + /** + * @param array $settings + * @return void + * @throws Exception + */ public function _beforeSuite($settings = []) { /** @var Pimcore $pimcoreModule */ @@ -50,6 +56,10 @@ public function initializeDefinitions() $this->prepareData($class); } + /** + * @param \stdClass $class + * @return void + */ public function prepareData($class) { $seeds = [10, 11, 42, 53, 65, 78, 85]; diff --git a/tests/_support/Helper/Service.php b/tests/_support/Helper/Service.php index eaa49072..1ac3e2b4 100644 --- a/tests/_support/Helper/Service.php +++ b/tests/_support/Helper/Service.php @@ -16,6 +16,10 @@ class Service extends Model */ protected static $container = null; + /** + * @param string $serviceId + * @return object|null + */ public function grabService(string $serviceId) { //TODO change this as soon as Pimcore helper as grabService method and requirement is bumped to pimcore/pimcore:10.4