Skip to content

Commit

Permalink
tests(coder): Update Coder to 8.3.11 (#1103)
Browse files Browse the repository at this point in the history
  • Loading branch information
klausi authored Nov 9, 2020
1 parent 8e4b807 commit 7586fce
Show file tree
Hide file tree
Showing 22 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ install:
phpstan/phpstan-phpunit:^0.12

# Install PHPCS to check for Drupal coding standards.
- travis_retry composer global require drupal/coder:8.3.10
- travis_retry composer global require drupal/coder:8.3.11
- $HOME/.config/composer/vendor/bin/phpcs --config-set installed_paths $HOME/.config/composer/vendor/drupal/coder/coder_sniffer

script:
Expand Down
10 changes: 5 additions & 5 deletions src/Entity/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public function configuration() {
}

/**
* TODO: Handle this through configuration (e.g. a context value).
* @todo Handle this through configuration (e.g. a context value).
*
* Returns to root value to use when resolving queries against the schema.
*
Expand Down Expand Up @@ -302,7 +302,7 @@ protected function getContext(SchemaPluginInterface $schema, array $config) {
}

/**
* TODO: Handle this through configuration on the server.
* @todo Handle this through configuration on the server.
*
* Returns the default field resolver.
*
Expand Down Expand Up @@ -348,7 +348,7 @@ protected function getErrorFormatter() {
}

/**
* TODO: Handle this through configurable plugins on the server.
* @todo Handle this through configurable plugins on the server.
*
* Returns the error handler.
*
Expand Down Expand Up @@ -438,7 +438,7 @@ public function getSortedPersistedQueryInstances() {
}

/**
* TODO: Handle this through configurable plugins on the server.
* @todo Handle this through configurable plugins on the server.
*
* Returns a callable for loading persisted queries.
*
Expand All @@ -460,7 +460,7 @@ protected function getPersistedQueryLoader() {
}

/**
* TODO: Handle this through configurable plugins on the server.
* @todo Handle this through configurable plugins on the server.
*
* Returns the validation rules to use for the query.
*
Expand Down
4 changes: 2 additions & 2 deletions src/GraphQL/Execution/Executor.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,10 @@ protected function doExecuteUncached() {
*/
protected function cachePrefix() {
// Sorting the variables and extensions will cause fewer cache vectors.
// TODO: Should we try to sort these recursively?
// @todo Should we try to sort these recursively?
$variables = $this->variables ?: [];
ksort($variables);
// TODO: Should we submit a pull request to also pass the extensions in the
// @todo Should we submit a pull request to also pass the extensions in the
// executor?
$extensions = $this->context->getOperation()->extensions ?: [];
ksort($extensions);
Expand Down
2 changes: 1 addition & 1 deletion src/GraphQL/Resolver/Path.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use GraphQL\Type\Definition\ResolveInfo;

/**
* @TODO: Delete this resolver. This is a plugin already.
* @todo Delete this resolver. This is a plugin already.
*/
class Path implements ResolverInterface {

Expand Down
2 changes: 1 addition & 1 deletion src/GraphQL/ResolverRegistryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function addFieldResolver($type, $field, ResolverInterface $resolver);
public function getFieldResolver($type, $field);

/**
* TODO: Type resolvers should also get their own interface.
* @todo Type resolvers should also get their own interface.
*
* @param string $abstract
* @param callable $resolver
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/GraphQL/DataProducer/DataProducerPluginBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function resolveField(FieldContext $field) {
throw new \LogicException('Missing data producer resolve method.');
}

// TODO: The field context should probably be the first argument.
// @todo The field context should probably be the first argument.
$context = $this->getContextValues();
return call_user_func_array(
[$this, 'resolve'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Drupal\graphql\Plugin\GraphQL\DataProducer\DataProducerPluginBase;

/**
* TODO: Fix input context type.
* @todo Fix input context type.
*
* @DataProducer(
* id = "menu_link_attribute",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Drupal\graphql\Plugin\GraphQL\DataProducer\DataProducerPluginBase;

/**
* TODO: Fix input context type.
* @todo Fix input context type.
*
* @DataProducer(
* id = "menu_link_description",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Drupal\graphql\Plugin\GraphQL\DataProducer\DataProducerPluginBase;

/**
* TODO: Fix input context type.
* @todo Fix input context type.
*
* @DataProducer(
* id = "menu_link_expanded",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Drupal\graphql\Plugin\GraphQL\DataProducer\DataProducerPluginBase;

/**
* TODO: Fix input context type.
* @todo Fix input context type.
*
* @DataProducer(
* id = "menu_link_label",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Drupal\graphql\Plugin\GraphQL\DataProducer\DataProducerPluginBase;

/**
* TODO: Fix input and output context type.
* @todo Fix input and output context type.
*
* @DataProducer(
* id = "menu_link_url",
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/GraphQL/DataProducer/Menu/MenuLinks.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
* TODO: Fix output context type.
* @todo Fix output context type.
*
* @DataProducer(
* id = "menu_links",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Drupal\graphql\Plugin\GraphQL\DataProducer\DataProducerPluginBase;

/**
* TODO: Fix input and output context type.
* @todo Fix input and output context type.
*
* @DataProducer(
* id = "menu_tree_link",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Drupal\graphql\Plugin\GraphQL\DataProducer\DataProducerPluginBase;

/**
* TODO: Fix input and output context type.
* @todo Fix input and output context type.
*
* @DataProducer(
* id = "menu_tree_subtree",
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/GraphQL/DataProducer/Routing/RouteLoad.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
* TODO: Fix the type of the output context.
* @todo Fix the type of the output context.
*
* @DataProducer(
* id = "route_load",
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/GraphQL/DataProducer/Routing/Url/UrlPath.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Drupal\graphql\Plugin\GraphQL\DataProducer\DataProducerPluginBase;

/**
* TODO: Fix the type of the input context.
* @todo Fix the type of the input context.
*
* @DataProducer(
* id = "url_path",
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/GraphQL/Schema/ComposableSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta
* {@inheritdoc}
*/
public function validateConfigurationForm(array &$form, FormStateInterface $formState) {
// TODO: Validate dependencies between extensions.
// @todo Validate dependencies between extensions.
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/SchemaPluginInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function getSchema(ResolverRegistryInterface $registry);
/**
* Retrieves the resolver registry.
*
* TODO: Instead, this should be configuration.
* @todo Instead, this should be configuration.
*
* @return \Drupal\graphql\GraphQL\ResolverRegistryInterface
* The resolver registry.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function testImageDerivative() {
$result
);

// TODO: Add cache checks.
// @todo Add cache checks.
// $this->assertContains('config:image.style.test_style',
// $metadata->getCacheTags());
// $this->assertContains('test_tag', $metadata->getCacheTags());
Expand All @@ -89,7 +89,7 @@ public function testImageDerivative() {

$this->assertNull($result);

// TODO: Add cache checks.
// @todo Add cache checks.
// $this->assertContains('test_tag_forbidden',
// $metadata->getCacheTags());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function testImageUrl() {

$this->assertEquals($this->file_url, $result);

// TODO: Add cache checks.
// @todo Add cache checks.
// $this->assertContains('test_tag', $metadata->getCacheTags());
// Test that we do not get a file we don't have access to, but the cache
// tags are still added.
Expand All @@ -59,7 +59,7 @@ public function testImageUrl() {

$this->assertNull($result);

// TODO: Add cache checks.
// @todo Add cache checks.
// $this->assertContains('test_tag_forbidden',
// $metadata->getCacheTags());
}
Expand Down
6 changes: 3 additions & 3 deletions tests/src/Kernel/DataProducer/EntityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ public function testResolveUnknownEntityLoad() {
'id' => 0,
]);

// TODO: Add metadata check.
// @todo Add metadata check.
// $this->assertContains('node_list', $metadata->getCacheTags());
$this->assertNull($result);
}
Expand All @@ -347,7 +347,7 @@ public function testResolveMismatchEntityLoad() {
'bundles' => ['otherbundle'],
]);

// TODO: Add metadata check.
// @todo Add metadata check.
// $this->assertContains('node:1', $metadata->getCacheTags());
$this->assertNull($result);
}
Expand Down Expand Up @@ -375,7 +375,7 @@ public function testResolveEntityRendered() {
'mode' => 'default',
]);

// TODO: Add metadata check.
// @todo Add metadata check.
// $this->assertContains('node:1', $metadata->getCacheTags());
$this->assertStringContainsString('<a href="/node/1" rel="bookmark"><span>' . $this->node->getTitle() . '</span>', $result);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/src/Kernel/DataProducer/Routing/RouteEntityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public function testRouteEntity() {
// and the 4xx-response cache tags.
$this->assertNull($result);

// TODO: Add cache checks.
// @todo Add cache checks.
// $this->assertContains('node_list', $metadata->getCacheTags());
// $this->assertContains('4xx-response', $metadata->getCacheTags());
}
Expand Down

0 comments on commit 7586fce

Please sign in to comment.