Skip to content

Commit d8bb753

Browse files
authored
Rules removed before Comment Rules begin (#1072)
1 parent efecfb1 commit d8bb753

37 files changed

Lines changed: 96 additions & 100 deletions

examples/graphql_example/src/Plugin/GraphQL/DataProducer/QueryArticles.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ public function __construct(
7777
}
7878

7979
/**
80-
* @param $offset
81-
* @param $limit
80+
* @param int $offset
81+
* @param int $limit
8282
* @param \Drupal\Core\Cache\RefinableCacheableDependencyInterface $metadata
8383
*
8484
* @return \Drupal\graphql_examples\Wrappers\QueryConnection

phpcs.xml.dist

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
<exclude name="Drupal.Commenting.ClassComment.Missing"/>
1111
<exclude name="Drupal.Commenting.DocComment.MissingShort"/>
1212
<exclude name="Drupal.Commenting.FunctionComment.MissingParamComment"/>
13-
<exclude name="Drupal.Commenting.FunctionComment.MissingParamType"/>
1413
<exclude name="Drupal.Commenting.FunctionComment.MissingReturnComment"/>
15-
<exclude name="Drupal.Commenting.FunctionComment.InvalidNoReturn"/>
1614
</rule>
1715

1816
</ruleset>

src/Annotation/DataProducer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ class DataProducer extends Plugin {
3737
/**
3838
* DataProducer constructor.
3939
*
40-
* @param $values
40+
* @param array $values
4141
* The plugin annotation values.
4242
*
4343
* @throws \Doctrine\Common\Annotations\AnnotationException
4444
* In case of missing required annotation values.
4545
*/
46-
public function __construct($values) {
46+
public function __construct(array $values) {
4747
if (!array_key_exists('id', $values) || !$values['id']) {
4848
throw new AnnotationException('The plugin is missing an "id" property.');
4949
}

src/Annotation/PersistedQuery.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ class PersistedQuery extends Plugin {
3737
/**
3838
* PersistedQuery constructor.
3939
*
40-
* @param $values
40+
* @param array $values
4141
* The plugin annotation values.
4242
*
4343
* @throws \Doctrine\Common\Annotations\AnnotationException
4444
* In case of missing required annotation values.
4545
*/
46-
public function __construct($values) {
46+
public function __construct(array $values) {
4747
if (!array_key_exists('id', $values) || !$values['id']) {
4848
throw new AnnotationException('The plugin is missing an "id" property.');
4949
}

src/GraphQL/Buffers/BufferBase.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,6 @@ protected function resolveBuffer(\SplObjectStorage $buffer) {
138138
*
139139
* @param array $buffer
140140
* The buffer as an array.
141-
*
142-
* @return array
143-
* The resolved results, keyed by their corresponding buffer item array key.
144141
*/
145142
protected function resolveBufferArray(array $buffer) {
146143
throw new \LogicException('Method not implemented.');

src/GraphQL/Execution/Executor.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ class Executor implements ExecutorImplementation {
113113
* @param \GraphQL\Type\Schema $schema
114114
* @param \GraphQL\Language\AST\DocumentNode $document
115115
* @param \Drupal\graphql\GraphQL\Execution\ResolveContext $context
116-
* @param $root
117-
* @param $variables
118-
* @param $operation
119-
* @param $resolver
116+
* @param mixed $root
117+
* @param mixed $variables
118+
* @param string $operation
119+
* @param callable $resolver
120120
*/
121121
public function __construct(
122122
CacheContextsManager $contextsManager,
@@ -130,7 +130,7 @@ public function __construct(
130130
$root,
131131
$variables,
132132
$operation,
133-
$resolver
133+
callable $resolver
134134
) {
135135
$this->contextsManager = $contextsManager;
136136
$this->cacheBackend = $cacheBackend;
@@ -153,10 +153,10 @@ public function __construct(
153153
* @param \GraphQL\Type\Schema $schema
154154
* @param \GraphQL\Language\AST\DocumentNode $document
155155
* @param \Drupal\graphql\GraphQL\Execution\ResolveContext $context
156-
* @param $root
157-
* @param $variables
158-
* @param $operation
159-
* @param $resolver
156+
* @param mixed $root
157+
* @param mixed $variables
158+
* @param string $operation
159+
* @param callable $resolver
160160
*
161161
* @return \Drupal\graphql\GraphQL\Execution\Executor
162162
*/
@@ -169,7 +169,7 @@ public static function create(
169169
$root,
170170
$variables,
171171
$operation,
172-
$resolver
172+
callable $resolver
173173
) {
174174
return new static(
175175
$container->get('cache_contexts_manager'),

src/GraphQL/Execution/ExecutorFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ public function __construct(ContainerInterface $container) {
2727
* @param \GraphQL\Executor\Promise\PromiseAdapter $adapter
2828
* @param \GraphQL\Type\Schema $schema
2929
* @param \GraphQL\Language\AST\DocumentNode $document
30-
* @param $root
30+
* @param mixed $root
3131
* @param \Drupal\graphql\GraphQL\Execution\ResolveContext $context
32-
* @param $variables
33-
* @param $operation
32+
* @param mixed $variables
33+
* @param string $operation
3434
* @param callable $resolver
3535
*
3636
* @return \Drupal\graphql\GraphQL\Execution\Executor

src/GraphQL/Execution/FieldContext.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function getContextLanguage() {
4646
}
4747

4848
/**
49-
* @param $language
49+
* @param string $language
5050
*
5151
* @return $this
5252
*/
@@ -63,7 +63,7 @@ public function setContextLanguage($language) {
6363
*
6464
* @param string $name
6565
* The name of the context.
66-
* @param $value
66+
* @param mixed $value
6767
* The value of the context.
6868
*
6969
* @return $this

src/GraphQL/Execution/ResolveContext.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class ResolveContext implements RefinableCacheableDependencyInterface {
5353
* @param \Drupal\graphql\Entity\ServerInterface $server
5454
* @param \GraphQL\Server\OperationParams $operation
5555
* @param \GraphQL\Language\AST\DocumentNode $document
56-
* @param $type
56+
* @param string $type
5757
* @param array $config
5858
*/
5959
public function __construct(
@@ -108,9 +108,9 @@ public function getContextLanguage() {
108108
}
109109

110110
/**
111-
* @param $language
111+
* @param string $language
112112
*
113-
* @return string
113+
* @return $this
114114
*/
115115
public function setContextLanguage($language) {
116116
$this->language = $language;
@@ -127,7 +127,7 @@ public function setContextLanguage($language) {
127127
* The resolve info object.
128128
* @param string $name
129129
* The name of the context.
130-
* @param $value
130+
* @param mixed $value
131131
* The value of the context.
132132
*
133133
* @return $this

src/GraphQL/Resolver/Argument.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Argument implements ResolverInterface {
1818
/**
1919
* Argument constructor.
2020
*
21-
* @param $name
21+
* @param string $name
2222
*/
2323
public function __construct($name) {
2424
$this->name = $name;

0 commit comments

Comments
 (0)