From d023a9467763fca13442d7fdcd3464879ed5c89a Mon Sep 17 00:00:00 2001 From: Imanol Eguskiza Date: Fri, 30 Jun 2023 12:19:57 +0200 Subject: [PATCH] EWPP-3421: Order use statements alphabetically. --- .../oe_theme_contact_forms.module | 4 ++-- .../oe_theme_content_call_proposals.module | 2 +- .../PageHeaderMetadata/CallForProposalsContentType.php | 2 +- .../oe_theme_content_call_tenders.module | 2 +- .../Display/CallForTendersStatusExtraField.php | 4 ++-- .../PageHeaderMetadata/CallForTendersContentType.php | 2 +- .../Display/ConsultationStatusExtraField.php | 2 +- .../oe_theme_content_entity_contact.module | 2 +- .../oe_theme_content_entity_contact.post_update.php | 2 +- .../oe_theme_content_event.module | 2 +- .../oe_theme_content_event.post_update.php | 2 +- .../ExtraField/Display/DateAwareExtraFieldBase.php | 2 +- .../Display/InfoDisclosureExtraFieldBase.php | 2 +- .../oe_theme_content_news/oe_theme_content_news.module | 4 ++-- .../oe_theme_content_news.post_update.php | 2 +- .../oe_theme_content_person.post_update.php | 2 +- .../oe_theme_content_project.module | 2 +- .../oe_theme_content_publication.module | 2 +- .../oe_theme_content_publication.post_update.php | 2 +- .../ExtraField/Display/PublicationDescription.php | 2 +- modules/oe_theme_helper/oe_theme_helper.module | 2 +- .../oe_theme_helper/oe_theme_helper.post_update.php | 2 +- .../src/Loader/ComponentLibraryLoader.php | 2 +- .../Display/PublicationDateExtraFieldBase.php | 2 +- .../Field/FieldFormatter/FeaturedMediaFormatter.php | 4 ++-- .../FieldFormatter/MediaThumbnailUrlFormatter.php | 4 ++-- .../src/TwigExtension/TwigExtension.php | 2 +- .../FieldFormatter/FeaturedMediaFormatterTest.php | 2 +- .../tests/src/Unit/TwigExtensionTest.php | 2 +- oe_theme.theme | 10 +++++----- tests/src/Behat/MinkContext.php | 2 +- .../Functional/ContentCallForProposalsRenderTest.php | 2 +- tests/src/Functional/ContentOrganisationRenderTest.php | 8 ++++---- tests/src/Functional/ContentPublicationRenderTest.php | 6 +++--- tests/src/Functional/ContentRenderTestBase.php | 4 ++-- tests/src/Functional/CorporateFooterRenderTest.php | 4 ++-- tests/src/Kernel/AbstractKernelTestBase.php | 2 +- tests/src/Kernel/Paragraphs/MediaParagraphsTest.php | 2 +- tests/src/Kernel/PersonRenderTest.php | 2 +- tests/src/PatternAssertions/SocialMediaLinksAssert.php | 2 +- .../src/PatternAssertions/TextFeaturedMediaAssert.php | 2 +- tests/src/Unit/AbstractUnitTestBase.php | 2 +- 42 files changed, 58 insertions(+), 58 deletions(-) diff --git a/modules/oe_theme_contact_forms/oe_theme_contact_forms.module b/modules/oe_theme_contact_forms/oe_theme_contact_forms.module index f81040490..d83d073c8 100644 --- a/modules/oe_theme_contact_forms/oe_theme_contact_forms.module +++ b/modules/oe_theme_contact_forms/oe_theme_contact_forms.module @@ -7,11 +7,11 @@ declare(strict_types = 1); -use Drupal\Core\Form\FormStateInterface; use Drupal\contact\Entity\ContactForm; use Drupal\contact\MessageInterface; -use Drupal\Core\Url; +use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Link; +use Drupal\Core\Url; /** * Implements hook_form_FORM_ID_alter() for contact_message_form(). diff --git a/modules/oe_theme_content_call_proposals/oe_theme_content_call_proposals.module b/modules/oe_theme_content_call_proposals/oe_theme_content_call_proposals.module index 2dd136f9a..f75517ade 100644 --- a/modules/oe_theme_content_call_proposals/oe_theme_content_call_proposals.module +++ b/modules/oe_theme_content_call_proposals/oe_theme_content_call_proposals.module @@ -7,8 +7,8 @@ declare(strict_types = 1); -use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\Display\EntityViewDisplayInterface; +use Drupal\Core\Entity\EntityInterface; /** * Implements hook_theme(). diff --git a/modules/oe_theme_content_call_proposals/src/Plugin/PageHeaderMetadata/CallForProposalsContentType.php b/modules/oe_theme_content_call_proposals/src/Plugin/PageHeaderMetadata/CallForProposalsContentType.php index c626db78e..f71edbf75 100644 --- a/modules/oe_theme_content_call_proposals/src/Plugin/PageHeaderMetadata/CallForProposalsContentType.php +++ b/modules/oe_theme_content_call_proposals/src/Plugin/PageHeaderMetadata/CallForProposalsContentType.php @@ -5,8 +5,8 @@ namespace Drupal\oe_theme_content_call_proposals\Plugin\PageHeaderMetadata; use Drupal\Core\StringTranslation\StringTranslationTrait; -use Drupal\oe_theme_helper\Plugin\PageHeaderMetadata\NodeViewRoutesBase; use Drupal\oe_content_call_proposals\CallForProposalsNodeWrapper; +use Drupal\oe_theme_helper\Plugin\PageHeaderMetadata\NodeViewRoutesBase; /** * Page header metadata for the OpenEuropa "Call for proposals" content type. diff --git a/modules/oe_theme_content_call_tenders/oe_theme_content_call_tenders.module b/modules/oe_theme_content_call_tenders/oe_theme_content_call_tenders.module index 162237660..6bd9e5aa1 100644 --- a/modules/oe_theme_content_call_tenders/oe_theme_content_call_tenders.module +++ b/modules/oe_theme_content_call_tenders/oe_theme_content_call_tenders.module @@ -7,8 +7,8 @@ declare(strict_types = 1); -use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\Display\EntityViewDisplayInterface; +use Drupal\Core\Entity\EntityInterface; use Drupal\oe_content_call_tenders\CallForTendersNodeWrapper; /** diff --git a/modules/oe_theme_content_call_tenders/src/Plugin/ExtraField/Display/CallForTendersStatusExtraField.php b/modules/oe_theme_content_call_tenders/src/Plugin/ExtraField/Display/CallForTendersStatusExtraField.php index faaa17de6..41a5244ce 100644 --- a/modules/oe_theme_content_call_tenders/src/Plugin/ExtraField/Display/CallForTendersStatusExtraField.php +++ b/modules/oe_theme_content_call_tenders/src/Plugin/ExtraField/Display/CallForTendersStatusExtraField.php @@ -9,9 +9,9 @@ use Drupal\Core\Plugin\ContainerFactoryPluginInterface; use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\extra_field\Plugin\ExtraFieldDisplayFormattedBase; -use Drupal\oe_time_caching\Cache\TimeBasedCacheTagGeneratorInterface; -use Drupal\oe_content_call_tenders\CallForTendersNodeWrapper; use Drupal\oe_content\CallEntityWrapperInterface; +use Drupal\oe_content_call_tenders\CallForTendersNodeWrapper; +use Drupal\oe_time_caching\Cache\TimeBasedCacheTagGeneratorInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** diff --git a/modules/oe_theme_content_call_tenders/src/Plugin/PageHeaderMetadata/CallForTendersContentType.php b/modules/oe_theme_content_call_tenders/src/Plugin/PageHeaderMetadata/CallForTendersContentType.php index ba3ed45be..672fb9554 100644 --- a/modules/oe_theme_content_call_tenders/src/Plugin/PageHeaderMetadata/CallForTendersContentType.php +++ b/modules/oe_theme_content_call_tenders/src/Plugin/PageHeaderMetadata/CallForTendersContentType.php @@ -5,8 +5,8 @@ namespace Drupal\oe_theme_content_call_tenders\Plugin\PageHeaderMetadata; use Drupal\Core\StringTranslation\StringTranslationTrait; -use Drupal\oe_theme_helper\Plugin\PageHeaderMetadata\NodeViewRoutesBase; use Drupal\oe_content_call_tenders\CallForTendersNodeWrapper; +use Drupal\oe_theme_helper\Plugin\PageHeaderMetadata\NodeViewRoutesBase; /** * Page header metadata for the OpenEuropa "Call for tenders" content type. diff --git a/modules/oe_theme_content_consultation/src/Plugin/ExtraField/Display/ConsultationStatusExtraField.php b/modules/oe_theme_content_consultation/src/Plugin/ExtraField/Display/ConsultationStatusExtraField.php index 019d6ce73..d712164b2 100644 --- a/modules/oe_theme_content_consultation/src/Plugin/ExtraField/Display/ConsultationStatusExtraField.php +++ b/modules/oe_theme_content_consultation/src/Plugin/ExtraField/Display/ConsultationStatusExtraField.php @@ -8,10 +8,10 @@ use Drupal\Core\Entity\ContentEntityInterface; use Drupal\Core\Plugin\ContainerFactoryPluginInterface; use Drupal\Core\StringTranslation\StringTranslationTrait; -use Drupal\oe_time_caching\Cache\TimeBasedCacheTagGeneratorInterface; use Drupal\extra_field\Plugin\ExtraFieldDisplayFormattedBase; use Drupal\oe_content\CallEntityWrapperInterface; use Drupal\oe_content_consultation\ConsultationNodeWrapper; +use Drupal\oe_time_caching\Cache\TimeBasedCacheTagGeneratorInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** diff --git a/modules/oe_theme_content_entity_contact/oe_theme_content_entity_contact.module b/modules/oe_theme_content_entity_contact/oe_theme_content_entity_contact.module index d78e76058..7f09862a2 100644 --- a/modules/oe_theme_content_entity_contact/oe_theme_content_entity_contact.module +++ b/modules/oe_theme_content_entity_contact/oe_theme_content_entity_contact.module @@ -7,8 +7,8 @@ declare(strict_types = 1); -use Drupal\oe_content_entity_contact\Entity\ContactInterface; use Drupal\Core\Entity\Display\EntityViewDisplayInterface; +use Drupal\oe_content_entity_contact\Entity\ContactInterface; /** * Implements hook_ENTITY_TYPE_view_alter(). diff --git a/modules/oe_theme_content_entity_contact/oe_theme_content_entity_contact.post_update.php b/modules/oe_theme_content_entity_contact/oe_theme_content_entity_contact.post_update.php index 5d65146d1..a93ba378e 100644 --- a/modules/oe_theme_content_entity_contact/oe_theme_content_entity_contact.post_update.php +++ b/modules/oe_theme_content_entity_contact/oe_theme_content_entity_contact.post_update.php @@ -8,8 +8,8 @@ declare(strict_types = 1); use Drupal\Component\Utility\Crypt; -use Drupal\Core\Entity\Entity\EntityViewDisplay; use Drupal\Core\Config\FileStorage; +use Drupal\Core\Entity\Entity\EntityViewDisplay; /** * Update "Default" and "Details" Contact entity view displays. diff --git a/modules/oe_theme_content_event/oe_theme_content_event.module b/modules/oe_theme_content_event/oe_theme_content_event.module index 86b44ab4c..a1858ef51 100644 --- a/modules/oe_theme_content_event/oe_theme_content_event.module +++ b/modules/oe_theme_content_event/oe_theme_content_event.module @@ -7,8 +7,8 @@ declare(strict_types = 1); -use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\Display\EntityViewDisplayInterface; +use Drupal\Core\Entity\EntityInterface; use Drupal\oe_theme\ValueObject\DateValueObject; /** diff --git a/modules/oe_theme_content_event/oe_theme_content_event.post_update.php b/modules/oe_theme_content_event/oe_theme_content_event.post_update.php index d1bc4e3da..df37b2e14 100644 --- a/modules/oe_theme_content_event/oe_theme_content_event.post_update.php +++ b/modules/oe_theme_content_event/oe_theme_content_event.post_update.php @@ -8,9 +8,9 @@ declare(strict_types = 1); use Drupal\Component\Utility\Crypt; +use Drupal\Core\Config\FileStorage; use Drupal\Core\Datetime\Entity\DateFormat; use Drupal\Core\Entity\Entity\EntityViewDisplay; -use Drupal\Core\Config\FileStorage; /** * Override event teaser view display. diff --git a/modules/oe_theme_content_event/src/Plugin/ExtraField/Display/DateAwareExtraFieldBase.php b/modules/oe_theme_content_event/src/Plugin/ExtraField/Display/DateAwareExtraFieldBase.php index c59b6cc01..ae30694fa 100644 --- a/modules/oe_theme_content_event/src/Plugin/ExtraField/Display/DateAwareExtraFieldBase.php +++ b/modules/oe_theme_content_event/src/Plugin/ExtraField/Display/DateAwareExtraFieldBase.php @@ -7,8 +7,8 @@ use Drupal\Component\Datetime\TimeInterface; use Drupal\Core\Cache\CacheableMetadata; use Drupal\Core\Datetime\DrupalDateTime; -use Drupal\oe_time_caching\Cache\TimeBasedCacheTagGeneratorInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; +use Drupal\oe_time_caching\Cache\TimeBasedCacheTagGeneratorInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** diff --git a/modules/oe_theme_content_event/src/Plugin/ExtraField/Display/InfoDisclosureExtraFieldBase.php b/modules/oe_theme_content_event/src/Plugin/ExtraField/Display/InfoDisclosureExtraFieldBase.php index c81d87642..e72b76fe0 100644 --- a/modules/oe_theme_content_event/src/Plugin/ExtraField/Display/InfoDisclosureExtraFieldBase.php +++ b/modules/oe_theme_content_event/src/Plugin/ExtraField/Display/InfoDisclosureExtraFieldBase.php @@ -6,8 +6,8 @@ use Drupal\Component\Datetime\TimeInterface; use Drupal\Core\Datetime\DateFormatterInterface; -use Drupal\oe_time_caching\Cache\TimeBasedCacheTagGeneratorInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; +use Drupal\oe_time_caching\Cache\TimeBasedCacheTagGeneratorInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** diff --git a/modules/oe_theme_content_news/oe_theme_content_news.module b/modules/oe_theme_content_news/oe_theme_content_news.module index 869f11423..997e78e9f 100644 --- a/modules/oe_theme_content_news/oe_theme_content_news.module +++ b/modules/oe_theme_content_news/oe_theme_content_news.module @@ -8,9 +8,9 @@ declare(strict_types = 1); use Drupal\Core\Cache\CacheableMetadata; -use Drupal\media\MediaInterface; -use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\Display\EntityViewDisplayInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\media\MediaInterface; /** * Implements template_preprocess_node() for the News node type. diff --git a/modules/oe_theme_content_news/oe_theme_content_news.post_update.php b/modules/oe_theme_content_news/oe_theme_content_news.post_update.php index 02baf5ad7..3688b1e42 100644 --- a/modules/oe_theme_content_news/oe_theme_content_news.post_update.php +++ b/modules/oe_theme_content_news/oe_theme_content_news.post_update.php @@ -8,9 +8,9 @@ declare(strict_types = 1); use Drupal\Component\Utility\Crypt; +use Drupal\Core\Config\FileStorage; use Drupal\Core\Datetime\Entity\DateFormat; use Drupal\Core\Entity\Entity\EntityViewDisplay; -use Drupal\Core\Config\FileStorage; /** * Add a date format for the News page header metadata. diff --git a/modules/oe_theme_content_person/oe_theme_content_person.post_update.php b/modules/oe_theme_content_person/oe_theme_content_person.post_update.php index c51a9ed4c..d490c4b09 100644 --- a/modules/oe_theme_content_person/oe_theme_content_person.post_update.php +++ b/modules/oe_theme_content_person/oe_theme_content_person.post_update.php @@ -7,9 +7,9 @@ declare(strict_types = 1); +use Drupal\Component\Utility\Crypt; use Drupal\Core\Config\FileStorage; use Drupal\Core\Entity\Entity\EntityViewDisplay; -use Drupal\Component\Utility\Crypt; use Drupal\Core\Entity\Entity\EntityViewMode; /** diff --git a/modules/oe_theme_content_project/oe_theme_content_project.module b/modules/oe_theme_content_project/oe_theme_content_project.module index fa9ddadbf..924e4fe25 100644 --- a/modules/oe_theme_content_project/oe_theme_content_project.module +++ b/modules/oe_theme_content_project/oe_theme_content_project.module @@ -7,8 +7,8 @@ declare(strict_types = 1); -use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\Display\EntityViewDisplayInterface; +use Drupal\Core\Entity\EntityInterface; /** * Implements hook_ENTITY_TYPE_view_alter(). diff --git a/modules/oe_theme_content_publication/oe_theme_content_publication.module b/modules/oe_theme_content_publication/oe_theme_content_publication.module index 61b725c92..cabcf80f6 100644 --- a/modules/oe_theme_content_publication/oe_theme_content_publication.module +++ b/modules/oe_theme_content_publication/oe_theme_content_publication.module @@ -7,8 +7,8 @@ declare(strict_types = 1); -use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\Display\EntityViewDisplayInterface; +use Drupal\Core\Entity\EntityInterface; /** * Implements hook_theme(). diff --git a/modules/oe_theme_content_publication/oe_theme_content_publication.post_update.php b/modules/oe_theme_content_publication/oe_theme_content_publication.post_update.php index cb48bdb4e..30bed617d 100644 --- a/modules/oe_theme_content_publication/oe_theme_content_publication.post_update.php +++ b/modules/oe_theme_content_publication/oe_theme_content_publication.post_update.php @@ -8,10 +8,10 @@ declare(strict_types = 1); use Drupal\Component\Utility\Crypt; +use Drupal\Core\Config\FileStorage; use Drupal\Core\Datetime\Entity\DateFormat; use Drupal\Core\Entity\Display\EntityViewDisplayInterface; use Drupal\Core\Entity\Entity\EntityViewDisplay; -use Drupal\Core\Config\FileStorage; use Drupal\image\Entity\ImageStyle; /** diff --git a/modules/oe_theme_content_publication/src/Plugin/ExtraField/Display/PublicationDescription.php b/modules/oe_theme_content_publication/src/Plugin/ExtraField/Display/PublicationDescription.php index 534f52223..9592a09aa 100644 --- a/modules/oe_theme_content_publication/src/Plugin/ExtraField/Display/PublicationDescription.php +++ b/modules/oe_theme_content_publication/src/Plugin/ExtraField/Display/PublicationDescription.php @@ -9,8 +9,8 @@ use Drupal\Core\Entity\EntityRepositoryInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Plugin\ContainerFactoryPluginInterface; -use Drupal\file\FileInterface; use Drupal\extra_field\Plugin\ExtraFieldDisplayFormattedBase; +use Drupal\file\FileInterface; use Drupal\image\Plugin\Field\FieldType\ImageItem; use Drupal\media\MediaInterface; use Drupal\media\Plugin\media\Source\Image; diff --git a/modules/oe_theme_helper/oe_theme_helper.module b/modules/oe_theme_helper/oe_theme_helper.module index bd94dab90..083beef75 100644 --- a/modules/oe_theme_helper/oe_theme_helper.module +++ b/modules/oe_theme_helper/oe_theme_helper.module @@ -8,10 +8,10 @@ declare(strict_types = 1); use Drupal\Component\Utility\Html; +use Drupal\Core\Cache\CacheableMetadata; use Drupal\Core\Entity\Display\EntityViewDisplayInterface; use Drupal\Core\Entity\Entity\EntityViewDisplay; use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Cache\CacheableMetadata; use Drupal\Core\Form\FormStateInterface; use Drupal\image\Plugin\Field\FieldType\ImageItem; use Drupal\media\MediaInterface; diff --git a/modules/oe_theme_helper/oe_theme_helper.post_update.php b/modules/oe_theme_helper/oe_theme_helper.post_update.php index 0ad3adaaf..aa69fdc99 100644 --- a/modules/oe_theme_helper/oe_theme_helper.post_update.php +++ b/modules/oe_theme_helper/oe_theme_helper.post_update.php @@ -8,8 +8,8 @@ declare(strict_types = 1); use Drupal\block\Entity\Block; -use Drupal\Core\Config\FileStorage; use Drupal\Component\Utility\Crypt; +use Drupal\Core\Config\FileStorage; use Drupal\Core\Entity\Entity\EntityViewMode; use Drupal\image\Entity\ImageStyle; diff --git a/modules/oe_theme_helper/src/Loader/ComponentLibraryLoader.php b/modules/oe_theme_helper/src/Loader/ComponentLibraryLoader.php index e3b1858e3..944c38a16 100644 --- a/modules/oe_theme_helper/src/Loader/ComponentLibraryLoader.php +++ b/modules/oe_theme_helper/src/Loader/ComponentLibraryLoader.php @@ -6,8 +6,8 @@ use Drupal\Core\Extension\ThemeHandlerInterface; use Drupal\Core\Logger\LoggerChannelFactoryInterface; -use OpenEuropa\Twig\Loader\EuropaComponentLibraryLoader; use Drupal\Core\Messenger\MessengerTrait; +use OpenEuropa\Twig\Loader\EuropaComponentLibraryLoader; /** * Load ECL components Twig templates. diff --git a/modules/oe_theme_helper/src/Plugin/ExtraField/Display/PublicationDateExtraFieldBase.php b/modules/oe_theme_helper/src/Plugin/ExtraField/Display/PublicationDateExtraFieldBase.php index 133f6bfb4..b9d9dc2e8 100644 --- a/modules/oe_theme_helper/src/Plugin/ExtraField/Display/PublicationDateExtraFieldBase.php +++ b/modules/oe_theme_helper/src/Plugin/ExtraField/Display/PublicationDateExtraFieldBase.php @@ -4,9 +4,9 @@ namespace Drupal\oe_theme_helper\Plugin\ExtraField\Display; +use Drupal\Core\Datetime\DateFormatterInterface; use Drupal\Core\Entity\ContentEntityInterface; use Drupal\Core\Plugin\ContainerFactoryPluginInterface; -use Drupal\Core\Datetime\DateFormatterInterface; use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\extra_field\Plugin\ExtraFieldDisplayFormattedBase; use Symfony\Component\DependencyInjection\ContainerInterface; diff --git a/modules/oe_theme_helper/src/Plugin/Field/FieldFormatter/FeaturedMediaFormatter.php b/modules/oe_theme_helper/src/Plugin/Field/FieldFormatter/FeaturedMediaFormatter.php index 1ef3334cb..b7c9eb12f 100644 --- a/modules/oe_theme_helper/src/Plugin/Field/FieldFormatter/FeaturedMediaFormatter.php +++ b/modules/oe_theme_helper/src/Plugin/Field/FieldFormatter/FeaturedMediaFormatter.php @@ -4,14 +4,14 @@ namespace Drupal\oe_theme_helper\Plugin\Field\FieldFormatter; +use Drupal\Core\Entity\EntityRepositoryInterface; +use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Field\FieldDefinitionInterface; use Drupal\Core\Field\FieldItemInterface; use Drupal\Core\Field\FieldItemListInterface; use Drupal\Core\Field\Plugin\Field\FieldFormatter\EntityReferenceFormatterBase; use Drupal\Core\Form\FormStateInterface; use Symfony\Component\DependencyInjection\ContainerInterface; -use Drupal\Core\Entity\EntityTypeManagerInterface; -use Drupal\Core\Entity\EntityRepositoryInterface; /** * Display a featured media field using the ECL media container. diff --git a/modules/oe_theme_helper/src/Plugin/Field/FieldFormatter/MediaThumbnailUrlFormatter.php b/modules/oe_theme_helper/src/Plugin/Field/FieldFormatter/MediaThumbnailUrlFormatter.php index 055e2c756..5f9cfa8ab 100644 --- a/modules/oe_theme_helper/src/Plugin/Field/FieldFormatter/MediaThumbnailUrlFormatter.php +++ b/modules/oe_theme_helper/src/Plugin/Field/FieldFormatter/MediaThumbnailUrlFormatter.php @@ -5,12 +5,12 @@ namespace Drupal\oe_theme_helper\Plugin\Field\FieldFormatter; use Drupal\Core\Cache\CacheableMetadata; +use Drupal\Core\Field\FieldDefinitionInterface; use Drupal\Core\Field\FieldItemListInterface; +use Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem; use Drupal\Core\Form\FormStateInterface; use Drupal\file\FileInterface; use Drupal\image\Plugin\Field\FieldFormatter\ImageFormatter; -use Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem; -use Drupal\Core\Field\FieldDefinitionInterface; /** * Plugin implementation of the 'media_thumbnail_url' formatter. diff --git a/modules/oe_theme_helper/src/TwigExtension/TwigExtension.php b/modules/oe_theme_helper/src/TwigExtension/TwigExtension.php index 11c15ad08..f8ee4b02b 100644 --- a/modules/oe_theme_helper/src/TwigExtension/TwigExtension.php +++ b/modules/oe_theme_helper/src/TwigExtension/TwigExtension.php @@ -14,9 +14,9 @@ use Drupal\Core\Render\RenderableInterface; use Drupal\Core\Render\RendererInterface; use Drupal\Core\Template\Attribute; +use Drupal\Core\Template\TwigExtension as CoreTwigExtension; use Drupal\oe_theme_helper\EuropeanUnionLanguages; use Drupal\oe_theme_helper\ExternalLinksInterface; -use Drupal\Core\Template\TwigExtension as CoreTwigExtension; use Drupal\smart_trim\TruncateHTML; use Twig\Environment; use Twig\Extension\AbstractExtension; diff --git a/modules/oe_theme_helper/tests/src/Kernel/Plugin/Field/FieldFormatter/FeaturedMediaFormatterTest.php b/modules/oe_theme_helper/tests/src/Kernel/Plugin/Field/FieldFormatter/FeaturedMediaFormatterTest.php index 72ee7aadf..703855dba 100644 --- a/modules/oe_theme_helper/tests/src/Kernel/Plugin/Field/FieldFormatter/FeaturedMediaFormatterTest.php +++ b/modules/oe_theme_helper/tests/src/Kernel/Plugin/Field/FieldFormatter/FeaturedMediaFormatterTest.php @@ -8,9 +8,9 @@ use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\file\Entity\File; -use Drupal\Tests\oe_theme\Kernel\AbstractKernelTestBase; use Drupal\node\Entity\Node; use Drupal\node\Entity\NodeType; +use Drupal\Tests\oe_theme\Kernel\AbstractKernelTestBase; /** * Tests the featured media formatter. diff --git a/modules/oe_theme_helper/tests/src/Unit/TwigExtensionTest.php b/modules/oe_theme_helper/tests/src/Unit/TwigExtensionTest.php index 62fb954f4..84145afff 100644 --- a/modules/oe_theme_helper/tests/src/Unit/TwigExtensionTest.php +++ b/modules/oe_theme_helper/tests/src/Unit/TwigExtensionTest.php @@ -9,9 +9,9 @@ use Drupal\Core\Language\LanguageManagerInterface; use Drupal\Core\Render\Renderer; use Drupal\Core\Template\Loader\StringLoader; +use Drupal\oe_theme_helper\EuropeanUnionLanguages; use Drupal\oe_theme_helper\ExternalLinksInterface; use Drupal\oe_theme_helper\TwigExtension\TwigExtension; -use Drupal\oe_theme_helper\EuropeanUnionLanguages; use Drupal\Tests\UnitTestCase; use Twig\Environment; use Twig\Error\RuntimeError; diff --git a/oe_theme.theme b/oe_theme.theme index a0c91f1a8..7490e1afb 100644 --- a/oe_theme.theme +++ b/oe_theme.theme @@ -8,16 +8,17 @@ declare(strict_types = 1); use Drupal\block\BlockInterface; +use Drupal\Component\Render\FormattableMarkup; use Drupal\Component\Utility\Html; -use Drupal\Core\Cache\CacheableMetadata; use Drupal\Core\Cache\CacheableDependencyInterface; +use Drupal\Core\Cache\CacheableMetadata; use Drupal\Core\Entity\ContentEntityInterface; use Drupal\Core\Entity\Entity\EntityViewDisplay; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Render\Element; +use Drupal\Core\Session\AccountInterface; use Drupal\Core\Template\Attribute; use Drupal\Core\Url; -use Drupal\Core\Session\AccountInterface; use Drupal\media\MediaInterface; use Drupal\media\Plugin\media\Source\Image; use Drupal\media\Plugin\media\Source\OEmbed; @@ -26,14 +27,13 @@ use Drupal\media_avportal\Plugin\media\Source\MediaAvPortalSourceInterface; use Drupal\media_avportal\Plugin\media\Source\MediaAvPortalVideoSource; use Drupal\node\NodeInterface; use Drupal\oe_content_person\Entity\PersonJobInterface; +use Drupal\oe_media_iframe\Plugin\media\Source\Iframe; use Drupal\oe_theme\DocumentMediaValueExtractor; -use Drupal\oe_theme\ValueObject\FileValueObject; use Drupal\oe_theme\ValueObject\DateValueObject; +use Drupal\oe_theme\ValueObject\FileValueObject; use Drupal\oe_theme\ValueObject\GalleryItemValueObject; use Drupal\oe_theme\ValueObject\ImageValueObject; use Drupal\oe_theme_helper\EuropeanUnionLanguages; -use Drupal\oe_media_iframe\Plugin\media\Source\Iframe; -use Drupal\Component\Render\FormattableMarkup; /** * Implements hook_form_FORM_ID_alter(). diff --git a/tests/src/Behat/MinkContext.php b/tests/src/Behat/MinkContext.php index 8329660aa..d7d8fc8f5 100644 --- a/tests/src/Behat/MinkContext.php +++ b/tests/src/Behat/MinkContext.php @@ -4,9 +4,9 @@ namespace Drupal\Tests\oe_theme\Behat; +use Behat\Gherkin\Node\TableNode; use Behat\Mink\Element\NodeElement; use Drupal\DrupalExtension\Context\MinkContext as DrupalExtensionMinkContext; -use Behat\Gherkin\Node\TableNode; use Drupal\Tests\oe_theme\Behat\Traits\UtilityTrait; use PHPUnit\Framework\Assert; diff --git a/tests/src/Functional/ContentCallForProposalsRenderTest.php b/tests/src/Functional/ContentCallForProposalsRenderTest.php index f81356cb2..a9dc92e49 100644 --- a/tests/src/Functional/ContentCallForProposalsRenderTest.php +++ b/tests/src/Functional/ContentCallForProposalsRenderTest.php @@ -7,8 +7,8 @@ use Drupal\Core\Datetime\DrupalDateTime; use Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface; use Drupal\Tests\oe_theme\PatternAssertions\FieldListAssert; -use Drupal\Tests\oe_theme\PatternAssertions\PatternPageHeaderAssert; use Drupal\Tests\oe_theme\PatternAssertions\InPageNavigationAssert; +use Drupal\Tests\oe_theme\PatternAssertions\PatternPageHeaderAssert; use Drupal\Tests\Traits\Core\CronRunTrait; use Drupal\user\Entity\Role; use Drupal\user\RoleInterface; diff --git a/tests/src/Functional/ContentOrganisationRenderTest.php b/tests/src/Functional/ContentOrganisationRenderTest.php index e60158bb0..84e007aae 100644 --- a/tests/src/Functional/ContentOrganisationRenderTest.php +++ b/tests/src/Functional/ContentOrganisationRenderTest.php @@ -4,14 +4,14 @@ namespace Drupal\Tests\oe_theme\Functional; -use Drupal\oe_content_entity\Entity\CorporateEntityInterface; +use Drupal\media\Entity\Media; use Drupal\node\Entity\Node; +use Drupal\oe_content_entity\Entity\CorporateEntityInterface; use Drupal\oe_content_person\Entity\PersonJob; +use Drupal\Tests\oe_theme\PatternAssertions\InPageNavigationAssert; +use Drupal\Tests\oe_theme\PatternAssertions\PatternPageHeaderAssert; use Drupal\user\Entity\Role; use Drupal\user\RoleInterface; -use Drupal\Tests\oe_theme\PatternAssertions\PatternPageHeaderAssert; -use Drupal\Tests\oe_theme\PatternAssertions\InPageNavigationAssert; -use Drupal\media\Entity\Media; /** * Tests organisation (oe_organisation) content type render. diff --git a/tests/src/Functional/ContentPublicationRenderTest.php b/tests/src/Functional/ContentPublicationRenderTest.php index 5ee5c3c9d..b75a4370d 100644 --- a/tests/src/Functional/ContentPublicationRenderTest.php +++ b/tests/src/Functional/ContentPublicationRenderTest.php @@ -5,12 +5,12 @@ namespace Drupal\Tests\oe_theme\Functional; use Drupal\field\Entity\FieldConfig; +use Drupal\Tests\oe_theme\PatternAssertions\FieldListAssert; +use Drupal\Tests\oe_theme\PatternAssertions\InPageNavigationAssert; use Drupal\Tests\oe_theme\PatternAssertions\ListItemAssert; +use Drupal\Tests\oe_theme\PatternAssertions\PatternPageHeaderAssert; use Drupal\user\Entity\Role; use Drupal\user\RoleInterface; -use Drupal\Tests\oe_theme\PatternAssertions\FieldListAssert; -use Drupal\Tests\oe_theme\PatternAssertions\PatternPageHeaderAssert; -use Drupal\Tests\oe_theme\PatternAssertions\InPageNavigationAssert; /** * Tests that "Publication" content type renders correctly. diff --git a/tests/src/Functional/ContentRenderTestBase.php b/tests/src/Functional/ContentRenderTestBase.php index b35b40ea0..7ae74e014 100644 --- a/tests/src/Functional/ContentRenderTestBase.php +++ b/tests/src/Functional/ContentRenderTestBase.php @@ -6,12 +6,12 @@ use Behat\Mink\Element\NodeElement; use Drupal\Core\Datetime\DrupalDateTime; +use Drupal\Core\Entity\EntityStorageInterface; use Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface; +use Drupal\media\MediaInterface; use Drupal\oe_content_entity\Entity\CorporateEntityInterface; use Drupal\oe_content_entity_contact\Entity\ContactInterface; use Drupal\oe_content_entity_venue\Entity\VenueInterface; -use Drupal\Core\Entity\EntityStorageInterface; -use Drupal\media\MediaInterface; use Drupal\oe_content_event_event_programme\Entity\ProgrammeItemInterface; use Drupal\oe_content_sub_entity\Entity\SubEntityInterface; use Drupal\oe_content_sub_entity_document_reference\Entity\DocumentReference; diff --git a/tests/src/Functional/CorporateFooterRenderTest.php b/tests/src/Functional/CorporateFooterRenderTest.php index 100cc6a70..790087e0c 100644 --- a/tests/src/Functional/CorporateFooterRenderTest.php +++ b/tests/src/Functional/CorporateFooterRenderTest.php @@ -4,10 +4,10 @@ namespace Drupal\Tests\oe_theme\Functional; -use Drupal\Tests\BrowserTestBase; -use Symfony\Component\Yaml\Yaml; use Behat\Mink\Element\NodeElement; use Drupal\Component\Utility\Html; +use Drupal\Tests\BrowserTestBase; +use Symfony\Component\Yaml\Yaml; /** * Test footer block rendering. diff --git a/tests/src/Kernel/AbstractKernelTestBase.php b/tests/src/Kernel/AbstractKernelTestBase.php index 824bfb701..fce3b2322 100644 --- a/tests/src/Kernel/AbstractKernelTestBase.php +++ b/tests/src/Kernel/AbstractKernelTestBase.php @@ -5,9 +5,9 @@ namespace Drupal\Tests\oe_theme\Kernel; use Drupal\Core\Plugin\ContextAwarePluginInterface; +use Drupal\Core\Site\Settings; use Drupal\KernelTests\KernelTestBase; use Drupal\Tests\oe_theme\Traits\RenderTrait; -use Drupal\Core\Site\Settings; use Symfony\Component\Yaml\Yaml; /** diff --git a/tests/src/Kernel/Paragraphs/MediaParagraphsTest.php b/tests/src/Kernel/Paragraphs/MediaParagraphsTest.php index 2571e5d4d..f8f834ed5 100644 --- a/tests/src/Kernel/Paragraphs/MediaParagraphsTest.php +++ b/tests/src/Kernel/Paragraphs/MediaParagraphsTest.php @@ -4,10 +4,10 @@ namespace Drupal\Tests\oe_theme\Kernel\Paragraphs; +use Drupal\Core\Url; use Drupal\paragraphs\Entity\Paragraph; use Drupal\Tests\oe_theme\PatternAssertions\CarouselAssert; use Drupal\Tests\oe_theme\PatternAssertions\TextFeaturedMediaAssert; -use Drupal\Core\Url; use Symfony\Component\DomCrawler\Crawler; /** diff --git a/tests/src/Kernel/PersonRenderTest.php b/tests/src/Kernel/PersonRenderTest.php index 826e7b5a0..50d47b87e 100644 --- a/tests/src/Kernel/PersonRenderTest.php +++ b/tests/src/Kernel/PersonRenderTest.php @@ -11,8 +11,8 @@ use Drupal\oe_content_entity_contact\Entity\ContactInterface; use Drupal\oe_content_person\Entity\PersonJob; use Drupal\oe_content_person\Entity\PersonJobInterface; -use Drupal\Tests\oe_theme\PatternAssertions\ListItemAssert; use Drupal\Tests\oe_theme\PatternAssertions\FieldListAssert; +use Drupal\Tests\oe_theme\PatternAssertions\ListItemAssert; use Drupal\Tests\user\Traits\UserCreationTrait; use Symfony\Component\DomCrawler\Crawler; diff --git a/tests/src/PatternAssertions/SocialMediaLinksAssert.php b/tests/src/PatternAssertions/SocialMediaLinksAssert.php index d3dcb801a..64dd355e5 100644 --- a/tests/src/PatternAssertions/SocialMediaLinksAssert.php +++ b/tests/src/PatternAssertions/SocialMediaLinksAssert.php @@ -4,8 +4,8 @@ namespace Drupal\Tests\oe_theme\PatternAssertions; -use Symfony\Component\DomCrawler\Crawler; use PHPUnit\Framework\Exception; +use Symfony\Component\DomCrawler\Crawler; /** * Assertions for the social media link pattern. diff --git a/tests/src/PatternAssertions/TextFeaturedMediaAssert.php b/tests/src/PatternAssertions/TextFeaturedMediaAssert.php index 83cab8c90..0ac55c79a 100644 --- a/tests/src/PatternAssertions/TextFeaturedMediaAssert.php +++ b/tests/src/PatternAssertions/TextFeaturedMediaAssert.php @@ -4,8 +4,8 @@ namespace Drupal\Tests\oe_theme\PatternAssertions; -use Symfony\Component\DomCrawler\Crawler; use PHPUnit\Framework\Exception; +use Symfony\Component\DomCrawler\Crawler; /** * Assertions for text_featured_media pattern. diff --git a/tests/src/Unit/AbstractUnitTestBase.php b/tests/src/Unit/AbstractUnitTestBase.php index 7038da758..298acea8b 100644 --- a/tests/src/Unit/AbstractUnitTestBase.php +++ b/tests/src/Unit/AbstractUnitTestBase.php @@ -4,8 +4,8 @@ namespace Drupal\Tests\oe_theme\Unit; -use Symfony\Component\Yaml\Yaml; use Drupal\Tests\UnitTestCase; +use Symfony\Component\Yaml\Yaml; /** * Base class for theme's unit tests.