Skip to content

Commit f26ecc3

Browse files
authored
Cleanup. (#516)
1 parent 6299e4a commit f26ecc3

78 files changed

Lines changed: 718 additions & 400 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

config/schema/graphql.graphql_query_map.schema.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ graphql.graphql_query_map.*:
55
version:
66
type: string
77
label: 'Version'
8-
query_map:
8+
map:
99
type: sequence
1010
label: 'QueryMap'
1111
sequence:

modules/graphql_core/src/GraphQL/EntityCrudOutputWrapper.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,33 @@ class EntityCrudOutputWrapper {
99
/**
1010
* The create entity.
1111
*
12-
* @var \Drupal\Core\Entity\EntityInterface|NULL
12+
* @var \Drupal\Core\Entity\EntityInterface|null
1313
*/
1414
protected $entity;
1515

1616
/**
1717
* The constraint validation list.
1818
*
19-
* @var \Symfony\Component\Validator\ConstraintViolationListInterface|NULL
19+
* @var \Symfony\Component\Validator\ConstraintViolationListInterface|null
2020
*/
2121
protected $violations;
2222

2323
/**
2424
* An array of error messages.
2525
*
26-
* @var array|NULL
26+
* @var array|null
2727
*/
2828
protected $errors;
2929

3030
/**
31-
* Creates a CreateEntityOutputWrapper object.
31+
* CreateEntityOutputWrapper constructor.
3232
*
33-
* @param \Drupal\Core\Entity\EntityInterface|NULL $entity
33+
* @param \Drupal\Core\Entity\EntityInterface|null $entity
3434
* The entity object that has been created or NULL if creation failed.
35-
* @param \Symfony\Component\Validator\ConstraintViolationListInterface|NULL $violations
35+
* @param \Symfony\Component\Validator\ConstraintViolationListInterface|null $violations
3636
* The validation errors that occurred during creation or NULL if validation
3737
* succeeded.
38-
* @param array|NULL $errors
38+
* @param array|null $errors
3939
* An array of non validation error messages. Can be used to provide
4040
* additional error messages e.g. for access restrictions.
4141
*/
@@ -52,7 +52,7 @@ public function __construct(
5252
/**
5353
* Returns the entity that was created.
5454
*
55-
* @return \Drupal\Core\Entity\EntityInterface|NULL
55+
* @return \Drupal\Core\Entity\EntityInterface|null
5656
* The created entity object or NULL if creation failed.
5757
*/
5858
public function getEntity() {
@@ -62,7 +62,7 @@ public function getEntity() {
6262
/**
6363
* Returns the constraint violations.
6464
*
65-
* @return \Symfony\Component\Validator\ConstraintViolationListInterface|NULL
65+
* @return \Symfony\Component\Validator\ConstraintViolationListInterface|null
6666
* The constraint validations or NULL if validation passed.
6767
*/
6868
public function getViolations() {
@@ -72,7 +72,7 @@ public function getViolations() {
7272
/**
7373
* Returns a list of error messages that occurred during entity creation.
7474
*
75-
* @return array|NULL
75+
* @return array|null
7676
* An array of error messages as plain strings.
7777
*/
7878
public function getErrors() {

modules/graphql_core/src/Plugin/Deriver/Enums/DisplayModeIdDeriver.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
namespace Drupal\graphql_core\Plugin\Deriver\Enums;
44

55
use Drupal\Component\Plugin\Derivative\DeriverBase;
6-
use Drupal\Core\Entity\ContentEntityTypeInterface;
7-
use Drupal\Core\Entity\EntityTypeBundleInfoInterface;
86
use Drupal\Core\Entity\EntityTypeManagerInterface;
97
use Drupal\Core\Entity\EntityViewModeInterface;
108
use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;

modules/graphql_core/src/Plugin/Deriver/Fields/ContextDeriver.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ public static function create(ContainerInterface $container, $basePluginId) {
2525
}
2626

2727
/**
28-
* {@inheritdoc}
28+
* ContextDeriver constructor.
29+
*
30+
* @param \Drupal\Core\Plugin\Context\ContextRepositoryInterface $contextRepository
31+
* The context repository service.
2932
*/
3033
public function __construct(ContextRepositoryInterface $contextRepository) {
3134
$this->contextRepository = $contextRepository;

modules/graphql_core/src/Plugin/Deriver/Fields/EntityByIdDeriver.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ public static function create(ContainerInterface $container, $basePluginId) {
2929
}
3030

3131
/**
32-
* {@inheritdoc}
32+
* EntityByIdDeriver constructor.
33+
*
34+
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager
35+
* The entity type manager service.
3336
*/
3437
public function __construct(EntityTypeManagerInterface $entityTypeManager) {
3538
$this->entityTypeManager = $entityTypeManager;

modules/graphql_core/src/Plugin/Deriver/Fields/EntityQueryDeriver.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use Drupal\Component\Plugin\Derivative\DeriverBase;
66
use Drupal\Core\Entity\ContentEntityTypeInterface;
77
use Drupal\Core\Entity\EntityTypeManagerInterface;
8-
use Drupal\Core\Field\BaseFieldDefinition;
98
use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
109
use Drupal\Core\StringTranslation\StringTranslationTrait;
1110
use Drupal\Core\TypedData\TypedDataManager;
@@ -40,7 +39,12 @@ public static function create(ContainerInterface $container, $basePluginId) {
4039
}
4140

4241
/**
43-
* {@inheritdoc}
42+
* EntityQueryDeriver constructor.
43+
*
44+
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager
45+
* The entity type manager service.
46+
* @param \Drupal\Core\TypedData\TypedDataManager $typedDataManager
47+
* The typed data manager service.
4448
*/
4549
public function __construct(
4650
EntityTypeManagerInterface $entityTypeManager,

modules/graphql_core/src/Plugin/Deriver/Fields/EntityRevisionByIdDeriver.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ public static function create(ContainerInterface $container, $basePluginId) {
2929
}
3030

3131
/**
32-
* {@inheritdoc}
32+
* EntityRevisionByIdDeriver constructor.
33+
*
34+
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager
35+
* The entity type manager service.
3336
*/
3437
public function __construct(EntityTypeManagerInterface $entityTypeManager) {
3538
$this->entityTypeManager = $entityTypeManager;

modules/graphql_core/src/Plugin/GraphQL/Enums/Images/ImageStyleId.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,18 @@ class ImageStyleId extends EnumPluginBase implements ContainerFactoryPluginInter
2424
*/
2525
protected $entityTypeManager;
2626

27+
/**
28+
* {@inheritdoc}
29+
*/
30+
public static function create(ContainerInterface $container, array $configuration, $pluginId, $pluginDefinition) {
31+
return new static(
32+
$configuration,
33+
$pluginId,
34+
$pluginDefinition,
35+
$container->get('entity_type.manager')
36+
);
37+
}
38+
2739
/**
2840
* ImageStyleId constructor.
2941
*
@@ -41,18 +53,6 @@ public function __construct(array $configuration, $pluginId, $pluginDefinition,
4153
$this->entityTypeManager = $entityTypeManager;
4254
}
4355

44-
/**
45-
* {@inheritdoc}
46-
*/
47-
public static function create(ContainerInterface $container, array $configuration, $pluginId, $pluginDefinition) {
48-
return new static(
49-
$configuration,
50-
$pluginId,
51-
$pluginDefinition,
52-
$container->get('entity_type.manager')
53-
);
54-
}
55-
5656
/**
5757
* {@inheritdoc}
5858
*/

modules/graphql_core/src/Plugin/GraphQL/Enums/Languages/LanguageId.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,18 @@ class LanguageId extends EnumPluginBase implements ContainerFactoryPluginInterfa
2525
*/
2626
protected $languageManager;
2727

28+
/**
29+
* {@inheritdoc}
30+
*/
31+
public static function create(ContainerInterface $container, array $configuration, $pluginId, $pluginDefinition) {
32+
return new static(
33+
$configuration,
34+
$pluginId,
35+
$pluginDefinition,
36+
$container->get('language_manager')
37+
);
38+
}
39+
2840
/**
2941
* LanguageId constructor.
3042
*
@@ -42,18 +54,6 @@ public function __construct(array $configuration, $pluginId, $pluginDefinition,
4254
$this->languageManager = $languageManager;
4355
}
4456

45-
/**
46-
* {@inheritdoc}
47-
*/
48-
public static function create(ContainerInterface $container, array $configuration, $pluginId, $pluginDefinition) {
49-
return new static(
50-
$configuration,
51-
$pluginId,
52-
$pluginDefinition,
53-
$container->get('language_manager')
54-
);
55-
}
56-
5757
/**
5858
* {@inheritdoc}
5959
*/

modules/graphql_core/src/Plugin/GraphQL/Fields/Blocks/BlocksByRegion.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,22 @@ public static function create(
8282
}
8383

8484
/**
85-
* {@inheritdoc}
85+
* BlocksByRegion constructor.
86+
*
87+
* @param array $configuration
88+
* The plugin configuration array.
89+
* @param string $pluginId
90+
* The plugin id.
91+
* @param mixed $pluginDefinition
92+
* The plugin definition.
93+
* @param \Drupal\graphql\GraphQL\Buffers\SubRequestBuffer $subRequestBuffer
94+
* The sub-request buffer service.
95+
* @param \Drupal\Core\Theme\ThemeManagerInterface $themeManager
96+
* The theme manager service.
97+
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager
98+
* The entity type manager service.
99+
* @param \Drupal\Core\Entity\EntityRepositoryInterface $entityRepository
100+
* The entity repository service.
86101
*/
87102
public function __construct(
88103
array $configuration,

0 commit comments

Comments
 (0)