diff --git a/modules/oe_media_avportal/src/Plugin/views/query/AVPortalQuery.php b/modules/oe_media_avportal/src/Plugin/views/query/AVPortalQuery.php index 88316a19..d6841900 100644 --- a/modules/oe_media_avportal/src/Plugin/views/query/AVPortalQuery.php +++ b/modules/oe_media_avportal/src/Plugin/views/query/AVPortalQuery.php @@ -81,7 +81,7 @@ class AVPortalQuery extends QueryPluginBase { * * phpcs:disable Drupal.Semantics.FunctionTriggerError.TriggerErrorTextLayoutRelaxed */ - public function __construct(array $configuration, $plugin_id, $plugin_definition, AvPortalClientFactory $client_factory, ConfigFactoryInterface $config_factory, ModuleExtensionList $moduleExtensionList = NULL) { + public function __construct(array $configuration, $plugin_id, $plugin_definition, AvPortalClientFactory $client_factory, ConfigFactoryInterface $config_factory, ?ModuleExtensionList $moduleExtensionList = NULL) { parent::__construct($configuration, $plugin_id, $plugin_definition); $this->clientFactory = $client_factory; $this->config = $config_factory->get('media_avportal.settings'); @@ -122,7 +122,7 @@ public static function create(ContainerInterface $container, array $configuratio * @return string * Table alias name. */ - public function ensureTable(string $table, string $relationship = NULL): string { + public function ensureTable(string $table, ?string $relationship = NULL): string { return ''; } @@ -144,7 +144,7 @@ public function ensureTable(string $table, string $relationship = NULL): string * @return string * The field name. */ - public function addField(string $table, string $field = NULL, string $alias = NULL, array $params = []): string { + public function addField(string $table, ?string $field = NULL, ?string $alias = NULL, array $params = []): string { return $field; } @@ -249,7 +249,7 @@ protected function createViewResults(array $results, ViewExecutable $view): void * @param string $operator * The condition operator. */ - public function addWhere(int $group = 0, string $field = NULL, $value = NULL, string $operator = NULL): void { + public function addWhere(int $group = 0, ?string $field = NULL, $value = NULL, ?string $operator = NULL): void { if (empty($group)) { $group = 0; } diff --git a/modules/oe_media_circabc/src/CircaBc/CircaBcClient.php b/modules/oe_media_circabc/src/CircaBc/CircaBcClient.php index 39e5499e..54f2380c 100644 --- a/modules/oe_media_circabc/src/CircaBc/CircaBcClient.php +++ b/modules/oe_media_circabc/src/CircaBc/CircaBcClient.php @@ -134,7 +134,7 @@ public function fillTranslations(CircaBcDocument $document): void { /** * {@inheritdoc} */ - public function query(string $uuid, string $langcode = NULL, string $query_string = NULL, int $page = 1, int $limit = 10): CircaBcDocumentResult { + public function query(string $uuid, ?string $langcode = NULL, ?string $query_string = NULL, int $page = 1, int $limit = 10): CircaBcDocumentResult { $endpoint = $this->config['url'] . '/service/circabc/files'; $query = [ 'node' => $uuid, diff --git a/modules/oe_media_circabc/src/CircaBc/CircaBcClientInterface.php b/modules/oe_media_circabc/src/CircaBc/CircaBcClientInterface.php index 6dc2222a..7d4228b3 100644 --- a/modules/oe_media_circabc/src/CircaBc/CircaBcClientInterface.php +++ b/modules/oe_media_circabc/src/CircaBc/CircaBcClientInterface.php @@ -56,7 +56,7 @@ public function fillTranslations(CircaBcDocument $document): void; * @return \Drupal\oe_media_circabc\CircaBc\CircaBcDocumentResult * The results. */ - public function query(string $uuid, string $langcode = NULL, string $query_string = NULL, int $page = 1, int $limit = 10): CircaBcDocumentResult; + public function query(string $uuid, ?string $langcode = NULL, ?string $query_string = NULL, int $page = 1, int $limit = 10): CircaBcDocumentResult; /** * Loads the available interest groups. diff --git a/modules/oe_media_circabc/src/Plugin/views/query/CircaBcQuery.php b/modules/oe_media_circabc/src/Plugin/views/query/CircaBcQuery.php index 673a70f3..b9aedd64 100644 --- a/modules/oe_media_circabc/src/Plugin/views/query/CircaBcQuery.php +++ b/modules/oe_media_circabc/src/Plugin/views/query/CircaBcQuery.php @@ -92,7 +92,7 @@ public static function create(ContainerInterface $container, array $configuratio * @return string * Table alias name. */ - public function ensureTable(string $table, string $relationship = NULL): string { + public function ensureTable(string $table, ?string $relationship = NULL): string { return ''; } @@ -114,7 +114,7 @@ public function ensureTable(string $table, string $relationship = NULL): string * @return string * The field name. */ - public function addField(string $table, string $field = NULL, string $alias = NULL, array $params = []): string { + public function addField(string $table, ?string $field = NULL, ?string $alias = NULL, array $params = []): string { return $field; } @@ -217,7 +217,7 @@ protected function createViewResults(CircaBcDocumentResult $result, ViewExecutab * @param string|null $operator * The condition operator. */ - public function addWhere(int $group = 0, string $field = NULL, $value = NULL, string $operator = NULL): void { + public function addWhere(int $group = 0, ?string $field = NULL, $value = NULL, ?string $operator = NULL): void { if (empty($group)) { $group = 0; } diff --git a/modules/oe_media_circabc/tests/src/FunctionalJavascript/DocumentMediaTest.php b/modules/oe_media_circabc/tests/src/FunctionalJavascript/DocumentMediaTest.php index f5fcb0d9..6421124c 100644 --- a/modules/oe_media_circabc/tests/src/FunctionalJavascript/DocumentMediaTest.php +++ b/modules/oe_media_circabc/tests/src/FunctionalJavascript/DocumentMediaTest.php @@ -6,10 +6,10 @@ use Drupal\Core\Entity\Entity\EntityFormDisplay; use Drupal\Core\Entity\Entity\EntityViewDisplay; -use Drupal\field\Entity\FieldConfig; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; -use Drupal\language\Entity\ConfigurableLanguage; use Drupal\Tests\oe_media\Traits\MediaTestTrait; +use Drupal\field\Entity\FieldConfig; +use Drupal\language\Entity\ConfigurableLanguage; use Drupal\views\Entity\View; /** diff --git a/modules/oe_media_circabc/tests/src/Kernel/DocumentMediaTest.php b/modules/oe_media_circabc/tests/src/Kernel/DocumentMediaTest.php index be98657b..ca1527a1 100644 --- a/modules/oe_media_circabc/tests/src/Kernel/DocumentMediaTest.php +++ b/modules/oe_media_circabc/tests/src/Kernel/DocumentMediaTest.php @@ -5,11 +5,11 @@ namespace Drupal\Tests\oe_media_circabc\Kernel; use Drupal\Core\Site\Settings; +use Drupal\Tests\oe_media\Kernel\MediaTestBase; use Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface; use Drupal\field\Entity\FieldConfig; use Drupal\language\Entity\ConfigurableLanguage; use Drupal\oe_media_circabc\Plugin\views\query\CircaBcQuery; -use Drupal\Tests\oe_media\Kernel\MediaTestBase; use Drupal\views\ViewExecutable; use Drupal\views\Views; diff --git a/modules/oe_media_gallery/src/Plugin/LinkSource/GalleryLinkSourceBase.php b/modules/oe_media_gallery/src/Plugin/LinkSource/GalleryLinkSourceBase.php index e0c8db63..7f0f70ca 100644 --- a/modules/oe_media_gallery/src/Plugin/LinkSource/GalleryLinkSourceBase.php +++ b/modules/oe_media_gallery/src/Plugin/LinkSource/GalleryLinkSourceBase.php @@ -137,7 +137,7 @@ public function preSave(ContentEntityInterface $entity): void { /** * {@inheritdoc} */ - public function getLinks(int $limit = NULL, int $offset = 0): LinkCollectionInterface { + public function getLinks(?int $limit = NULL, int $offset = 0): LinkCollectionInterface { $links = new LinkCollection(); $ids = $this->configuration['media']; if (!$ids) { diff --git a/modules/oe_media_gallery/tests/src/FunctionalJavascript/GalleryTest.php b/modules/oe_media_gallery/tests/src/FunctionalJavascript/GalleryTest.php index b978797e..4f409c1a 100644 --- a/modules/oe_media_gallery/tests/src/FunctionalJavascript/GalleryTest.php +++ b/modules/oe_media_gallery/tests/src/FunctionalJavascript/GalleryTest.php @@ -6,8 +6,8 @@ use Behat\Mink\Element\NodeElement; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; -use Drupal\media\Entity\Media; use Drupal\Tests\oe_link_lists\Traits\LinkListTestTrait; +use Drupal\media\Entity\Media; /** * Tests the Gallery link list bundle. diff --git a/modules/oe_media_gallery/tests/src/Kernel/GalleryTest.php b/modules/oe_media_gallery/tests/src/Kernel/GalleryTest.php index 3dc15fb2..568ec3b9 100644 --- a/modules/oe_media_gallery/tests/src/Kernel/GalleryTest.php +++ b/modules/oe_media_gallery/tests/src/Kernel/GalleryTest.php @@ -4,11 +4,11 @@ namespace Drupa\Tests\oe_media_gallery\Kernel; +use Drupal\Tests\oe_media\Kernel\MediaTestBase; use Drupal\media\Entity\Media; use Drupal\media\MediaInterface; use Drupal\oe_link_lists\Entity\LinkList; use Drupal\oe_link_lists\EntityAwareLinkInterface; -use Drupal\Tests\oe_media\Kernel\MediaTestBase; /** * Tests the Gallery link list type. diff --git a/modules/oe_media_iframe/tests/src/Kernel/IframeSourceTest.php b/modules/oe_media_iframe/tests/src/Kernel/IframeSourceTest.php index 27debb36..d70cb01e 100644 --- a/modules/oe_media_iframe/tests/src/Kernel/IframeSourceTest.php +++ b/modules/oe_media_iframe/tests/src/Kernel/IframeSourceTest.php @@ -4,9 +4,9 @@ namespace Drupal\Tests\oe_media_iframe\Kernel; +use Drupal\Tests\media\Kernel\MediaKernelTestBase; use Drupal\field\Entity\FieldConfig; use Drupal\media\Entity\MediaType; -use Drupal\Tests\media\Kernel\MediaKernelTestBase; /** * Tests iframe media source. diff --git a/modules/oe_media_iframe/tests/src/Unit/FilterIframeTagTest.php b/modules/oe_media_iframe/tests/src/Unit/FilterIframeTagTest.php index 32c15971..6ba7e462 100644 --- a/modules/oe_media_iframe/tests/src/Unit/FilterIframeTagTest.php +++ b/modules/oe_media_iframe/tests/src/Unit/FilterIframeTagTest.php @@ -4,8 +4,8 @@ namespace Drupal\Tests\oe_media_iframe\Unit; -use Drupal\oe_media_iframe\Plugin\Filter\FilterIframeTag; use Drupal\Tests\UnitTestCase; +use Drupal\oe_media_iframe\Plugin\Filter\FilterIframeTag; /** * Tests the filter_iframe_tag filter plugin. diff --git a/modules/oe_media_link_lists/tests/src/FunctionalJavascript/InternalMediaLinksFormTest.php b/modules/oe_media_link_lists/tests/src/FunctionalJavascript/InternalMediaLinksFormTest.php index 002a5307..c8c89f9e 100644 --- a/modules/oe_media_link_lists/tests/src/FunctionalJavascript/InternalMediaLinksFormTest.php +++ b/modules/oe_media_link_lists/tests/src/FunctionalJavascript/InternalMediaLinksFormTest.php @@ -4,11 +4,11 @@ namespace Drupal\Tests\oe_media_link_lists\FunctionalJavascript; +use Drupal\Tests\oe_link_lists_manual_source\FunctionalJavascript\ManualLinkListTestBase; use Drupal\file\Entity\File; use Drupal\media\Entity\Media; use Drupal\media\MediaInterface; use Drupal\oe_link_lists\DefaultLink; -use Drupal\Tests\oe_link_lists_manual_source\FunctionalJavascript\ManualLinkListTestBase; /** * Tests the manual internal media links. diff --git a/modules/oe_media_webtools/tests/src/Kernel/OpPublicationListIdWidgetTest.php b/modules/oe_media_webtools/tests/src/Kernel/OpPublicationListIdWidgetTest.php index 3c0637c5..0ab4943f 100644 --- a/modules/oe_media_webtools/tests/src/Kernel/OpPublicationListIdWidgetTest.php +++ b/modules/oe_media_webtools/tests/src/Kernel/OpPublicationListIdWidgetTest.php @@ -4,8 +4,8 @@ namespace Drupal\Tests\oe_media_webtools\Kernel; -use Drupal\oe_media_webtools\Plugin\Field\FieldWidget\OpPublicationListIdWidget; use Drupal\Tests\oe_media\Kernel\MediaTestBase; +use Drupal\oe_media_webtools\Plugin\Field\FieldWidget\OpPublicationListIdWidget; /** * Tests the 'OP Publication List ID' field widget. diff --git a/tests/modules/oe_media_oembed_mock/src/OEmbedClientMiddleware.php b/tests/modules/oe_media_oembed_mock/src/OEmbedClientMiddleware.php index 85e89eba..88105f83 100644 --- a/tests/modules/oe_media_oembed_mock/src/OEmbedClientMiddleware.php +++ b/tests/modules/oe_media_oembed_mock/src/OEmbedClientMiddleware.php @@ -71,7 +71,7 @@ class OEmbedClientMiddleware { * @param \Drupal\Core\Extension\ModuleExtensionList|null $moduleExtensionList * The module extension list. */ - public function __construct(ConfigFactoryInterface $configFactory, EventDispatcherInterface $eventDispatcher, ModuleExtensionList $moduleExtensionList = NULL) { + public function __construct(ConfigFactoryInterface $configFactory, EventDispatcherInterface $eventDispatcher, ?ModuleExtensionList $moduleExtensionList = NULL) { $this->config = $configFactory->get('media.settings'); $this->eventDispatcher = $eventDispatcher; diff --git a/tests/src/Behat/MediaContext.php b/tests/src/Behat/MediaContext.php index 9cdc7d60..5972c152 100644 --- a/tests/src/Behat/MediaContext.php +++ b/tests/src/Behat/MediaContext.php @@ -9,8 +9,8 @@ use Behat\Gherkin\Node\TableNode; use Drupal\DrupalExtension\Context\ConfigContext; use Drupal\DrupalExtension\Context\RawDrupalContext; -use Drupal\file\FileInterface; use Drupal\Tests\oe_media\Traits\MediaTestTrait; +use Drupal\file\FileInterface; /** * Context to related to media testing. diff --git a/tests/src/Kernel/MediaAccessTest.php b/tests/src/Kernel/MediaAccessTest.php index 79a62675..aab7e294 100644 --- a/tests/src/Kernel/MediaAccessTest.php +++ b/tests/src/Kernel/MediaAccessTest.php @@ -4,9 +4,9 @@ namespace Drupal\Tests\oe_media\Kernel; -use Drupal\media\Entity\Media; use Drupal\Tests\media\Kernel\MediaKernelTestBase; use Drupal\Tests\user\Traits\UserCreationTrait; +use Drupal\media\Entity\Media; use Drupal\user\Entity\Role; use Drupal\views\ViewExecutable; use Drupal\views\Views; diff --git a/tests/src/Kernel/MediaImageTest.php b/tests/src/Kernel/MediaImageTest.php index fa901cab..9ff0523b 100644 --- a/tests/src/Kernel/MediaImageTest.php +++ b/tests/src/Kernel/MediaImageTest.php @@ -4,9 +4,9 @@ namespace Drupal\Tests\oe_media\Kernel; +use Drupal\Tests\media\Kernel\MediaKernelTestBase; use Drupal\file\Entity\File; use Drupal\media\Entity\Media; -use Drupal\Tests\media\Kernel\MediaKernelTestBase; /** * Tests image media.