Skip to content
Snippets Groups Projects
Commit a3ff5256 authored by Patrick Kenny's avatar Patrick Kenny
Browse files

Merge branch 'coding_standards' into '8.x-1.x'

Issue #3339626: Fix coding standards

See merge request !3
parents 9c300ca7 0ce5f87e
No related branches found
No related tags found
No related merge requests found
Pipeline #123351 passed with warnings
Showing
with 63 additions and 24 deletions
# JSON:API Resources
This module let's you define custom resources at routes of your choice that use existing resource types. This is useful
for defining routes that return resource objects based on context like the currently authenticated user instead of a
This module let's you define custom resources at routes of your choice that use
existing resource types. This is useful for defining routes that return resource
objects based on context like the currently authenticated user instead of a
route parameter (e.g. a UUID)
<?php declare(strict_types = 1);
<?php
declare(strict_types=1);
namespace Drupal\jsonapi_resources\Entity\Query;
......
<?php declare(strict_types = 1);
<?php
declare(strict_types=1);
namespace Drupal\jsonapi_resources\Entity\Query;
......
<?php declare(strict_types = 1);
<?php
declare(strict_types=1);
namespace Drupal\jsonapi_resources\Exception;
......
<?php declare(strict_types = 1);
<?php
declare(strict_types=1);
namespace Drupal\jsonapi_resources\Exception;
......
<?php declare(strict_types = 1);
<?php
declare(strict_types=1);
namespace Drupal\jsonapi_resources\Resource;
......@@ -6,9 +8,9 @@ use Drupal\Core\Cache\CacheableMetadata;
use Drupal\Core\Entity\Query\QueryInterface;
use Drupal\Core\Entity\RevisionableStorageInterface;
use Drupal\jsonapi\JsonApiResource\ResourceObjectData;
use Drupal\jsonapi_resources\Entity\Query\PaginatorInterface;
use Drupal\jsonapi_resources\Unstable\Entity\Query\CacheabilityCapturingExecutor;
use Drupal\jsonapi_resources\Unstable\Entity\Query\Pagination\OffsetLimitPaginator;
use Drupal\jsonapi_resources\Entity\Query\PaginatorInterface;
use Symfony\Component\HttpFoundation\Request;
/**
......
<?php declare(strict_types = 1);
<?php
declare(strict_types=1);
namespace Drupal\jsonapi_resources\Resource;
......
<?php declare(strict_types = 1);
<?php
declare(strict_types=1);
namespace Drupal\jsonapi_resources\Resource;
......@@ -115,7 +117,7 @@ abstract class ResourceBase {
return array_map(function ($resource_type_name) use ($route_name) {
$resource_type = $this->resourceTypeRepository->getByTypeName($resource_type_name);
if (is_null($resource_type)) {
// @todo: try to move this exception into Drupal\jsonapi_resources\Routing\ResourceRoutes::ensureResourceImplementationValid().
// @todo Try to move this exception into Drupal\jsonapi_resources\Routing\ResourceRoutes::ensureResourceImplementationValid().
throw new RouteDefinitionException("The $route_name route definition's _jsonapi_resource_types route default declares the resource type $resource_type_name but a resource type by that name does not exist.");
}
return $resource_type;
......
<?php declare(strict_types = 1);
<?php
declare(strict_types=1);
namespace Drupal\jsonapi_resources\Unstable\Controller\ArgumentResolver;
......
<?php declare(strict_types = 1);
<?php
declare(strict_types=1);
namespace Drupal\jsonapi_resources\Unstable\Controller;
......
<?php declare(strict_types = 1);
<?php
declare(strict_types=1);
namespace Drupal\jsonapi_resources\Unstable\DependencyInjection;
......
<?php declare(strict_types = 1);
<?php
declare(strict_types=1);
namespace Drupal\jsonapi_resources\Unstable;
......
<?php declare(strict_types = 1);
<?php
declare(strict_types=1);
namespace Drupal\jsonapi_resources\Unstable\Entity;
......@@ -59,7 +61,7 @@ trait EntityCreationTrait {
// Return a 409 Conflict response in accordance with the JSON:API spec. See
// http://jsonapi.org/format/#crud-creating-responses-409.
try {
// @todo: remove the assignment of the entity type manager to a variable when an "Aware" interface is added.
// @todo remove the assignment of the entity type manager to a variable when an "Aware" interface is added.
/** @var \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager */
/** @var \Drupal\Core\Entity\EntityStorageInterface $entity_storage */
$entity_type_manager = $this->entityTypeManager;
......
<?php declare(strict_types = 1);
<?php
declare(strict_types=1);
namespace Drupal\jsonapi_resources\Unstable\Entity\Query;
......
<?php declare(strict_types = 1);
<?php
declare(strict_types=1);
namespace Drupal\jsonapi_resources\Unstable\Entity\Query\Pagination;
......
<?php declare(strict_types = 1);
<?php
declare(strict_types=1);
namespace Drupal\jsonapi_resources\Unstable\Entity;
......
<?php declare(strict_types = 1);
<?php
declare(strict_types=1);
namespace Drupal\jsonapi_resources\Unstable\Entity;
......
<?php declare(strict_types = 1);
<?php
declare(strict_types=1);
namespace Drupal\jsonapi_resources\Unstable\Entity;
......
<?php declare(strict_types = 1);
<?php
declare(strict_types=1);
namespace Drupal\jsonapi_resources\Unstable;
......
<?php declare(strict_types = 1);
<?php
declare(strict_types=1);
namespace Drupal\jsonapi_resources\Unstable\Routing\Enhancer;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment