Skip to content

Commit

Permalink
EWPP-4909: Fix grumphp issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
22Alexandra committed Nov 14, 2024
1 parent 4185c87 commit ef14c07
Show file tree
Hide file tree
Showing 17 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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 '';
}

Expand All @@ -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;
}

Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion modules/oe_media_circabc/src/CircaBc/CircaBcClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 '';
}

Expand All @@ -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;
}

Expand Down Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion modules/oe_media_gallery/tests/src/Kernel/GalleryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion tests/src/Behat/MediaContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tests/src/Kernel/MediaAccessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/src/Kernel/MediaImageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit ef14c07

Please sign in to comment.