diff --git a/CHANGELOG.md b/CHANGELOG.md index 924b477..4d0f9f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - fix usage of dynamic properties on UiFieldTest - fix Issue #3312077 - Route entity.template_whisperer.add_form does not exist - by LeoAlcci, christyanpaim, Bohus Ulrych, wengerk - fix Issue #3312076 - The template_whisperer_suggestion entity type did not specify a view_builder handler - by immaculatexavier, Bohus Ulrych, wengerk +- fix phpcs use statements should be sorted alphabetically ### Added - add coverage of Drupal 10.1.x diff --git a/inc/access.inc b/inc/access.inc index 896a04b..d483f47 100644 --- a/inc/access.inc +++ b/inc/access.inc @@ -5,11 +5,11 @@ * Contains hook to make sure manage Template Whisperer fields access. */ +use Drupal\Core\Access\AccessResult; // Use statements to support hook_entity_field_access. use Drupal\Core\Field\FieldDefinitionInterface; -use Drupal\Core\Session\AccountInterface; use Drupal\Core\Field\FieldItemListInterface; -use Drupal\Core\Access\AccessResult; +use Drupal\Core\Session\AccountInterface; /** * Implements hook_entity_field_access(). diff --git a/src/Controller/AdminSuggestionController.php b/src/Controller/AdminSuggestionController.php index 144c608..3bd01b0 100644 --- a/src/Controller/AdminSuggestionController.php +++ b/src/Controller/AdminSuggestionController.php @@ -2,13 +2,13 @@ namespace Drupal\template_whisperer\Controller; -use Drupal\Core\Pager\PagerManagerInterface; -use Drupal\template_whisperer\Entity\TemplateWhispererSuggestionEntityInterface; use Drupal\Core\Controller\ControllerBase; -use Symfony\Component\DependencyInjection\ContainerInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; -use Drupal\template_whisperer\TemplateWhispererSuggestionUsage; +use Drupal\Core\Pager\PagerManagerInterface; use Drupal\Core\Routing\UrlGeneratorInterface; +use Drupal\template_whisperer\Entity\TemplateWhispererSuggestionEntityInterface; +use Drupal\template_whisperer\TemplateWhispererSuggestionUsage; +use Symfony\Component\DependencyInjection\ContainerInterface; /** * Listing of Template Whisperer suggestions. diff --git a/src/Entity/TemplateWhispererSuggestionEntity.php b/src/Entity/TemplateWhispererSuggestionEntity.php index 4ebdce7..5eb75c3 100644 --- a/src/Entity/TemplateWhispererSuggestionEntity.php +++ b/src/Entity/TemplateWhispererSuggestionEntity.php @@ -2,8 +2,8 @@ namespace Drupal\template_whisperer\Entity; -use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Config\Entity\ConfigEntityBase; +use Drupal\Core\Entity\EntityStorageInterface; /** * Defines the Template Whisperer Suggestion entity. diff --git a/src/Form/TemplateWhispererSuggestionForm.php b/src/Form/TemplateWhispererSuggestionForm.php index 7e40eda..dc531d7 100644 --- a/src/Form/TemplateWhispererSuggestionForm.php +++ b/src/Form/TemplateWhispererSuggestionForm.php @@ -3,9 +3,9 @@ namespace Drupal\template_whisperer\Form; use Drupal\Core\Entity\EntityForm; -use Symfony\Component\DependencyInjection\ContainerInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\template_whisperer\TemplateWhispererManager; +use Symfony\Component\DependencyInjection\ContainerInterface; /** * Form controller for Template Whisperer forms. diff --git a/src/Plugin/Field/FieldType/TemplateWhispererFieldItem.php b/src/Plugin/Field/FieldType/TemplateWhispererFieldItem.php index 391327b..46aca42 100644 --- a/src/Plugin/Field/FieldType/TemplateWhispererFieldItem.php +++ b/src/Plugin/Field/FieldType/TemplateWhispererFieldItem.php @@ -3,10 +3,10 @@ namespace Drupal\template_whisperer\Plugin\Field\FieldType; use Drupal\Core\Field\FieldItemBase; -use Drupal\Core\TypedData\DataDefinition; use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\Core\TypedData\DataDefinition; /** * Plugin implementation of the 'template_whisperer' field type. diff --git a/src/Plugin/Field/FieldWidget/TemplateWhispererWidget.php b/src/Plugin/Field/FieldWidget/TemplateWhispererWidget.php index 915743e..5bec147 100644 --- a/src/Plugin/Field/FieldWidget/TemplateWhispererWidget.php +++ b/src/Plugin/Field/FieldWidget/TemplateWhispererWidget.php @@ -2,13 +2,13 @@ namespace Drupal\template_whisperer\Plugin\Field\FieldWidget; +use Drupal\Core\Field\FieldDefinitionInterface; use Drupal\Core\Field\FieldItemListInterface; use Drupal\Core\Field\WidgetBase; -use Drupal\Core\Plugin\ContainerFactoryPluginInterface; -use Symfony\Component\DependencyInjection\ContainerInterface; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Field\FieldDefinitionInterface; +use Drupal\Core\Plugin\ContainerFactoryPluginInterface; use Drupal\template_whisperer\TemplateWhispererManager; +use Symfony\Component\DependencyInjection\ContainerInterface; /** * Plugin implementation of the 'template_whisperer' widget. diff --git a/src/TemplateWhispererSuggestionListBuilder.php b/src/TemplateWhispererSuggestionListBuilder.php index b873e88..73e55af 100644 --- a/src/TemplateWhispererSuggestionListBuilder.php +++ b/src/TemplateWhispererSuggestionListBuilder.php @@ -3,11 +3,11 @@ namespace Drupal\template_whisperer; use Drupal\Core\Config\Entity\ConfigEntityListBuilder; -use Drupal\Core\Entity\EntityTypeInterface; -use Symfony\Component\DependencyInjection\ContainerInterface; +use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityStorageInterface; +use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Routing\UrlGeneratorInterface; -use Drupal\Core\Entity\EntityInterface; +use Symfony\Component\DependencyInjection\ContainerInterface; /** * Defines a class to build a listing of templates whisperer entities. diff --git a/src/TwigExtension/TwigExtension.php b/src/TwigExtension/TwigExtension.php index eee907b..86231d7 100644 --- a/src/TwigExtension/TwigExtension.php +++ b/src/TwigExtension/TwigExtension.php @@ -2,10 +2,10 @@ namespace Drupal\template_whisperer\TwigExtension; -use Twig\TwigFunction; use Drupal\template_whisperer\TemplateWhispererManager; use Drupal\template_whisperer\TemplateWhispererSuggestionUsage; use Twig\Extension\AbstractExtension; +use Twig\TwigFunction; /** * Template Whisperer Twig extensions. diff --git a/tests/src/Kernel/FieldTemplateWhispererTest.php b/tests/src/Kernel/FieldTemplateWhispererTest.php index c2a7033..1b0762d 100644 --- a/tests/src/Kernel/FieldTemplateWhispererTest.php +++ b/tests/src/Kernel/FieldTemplateWhispererTest.php @@ -2,8 +2,8 @@ namespace Drupal\Tests\template_whisperer\Kernel; -use Drupal\Core\Field\FieldItemListInterface; use Drupal\Core\Field\FieldItemInterface; +use Drupal\Core\Field\FieldItemListInterface; use Drupal\Tests\field\Kernel\FieldKernelTestBase; use Drupal\Tests\user\Traits\UserCreationTrait;