Skip to content

Commit

Permalink
Fixes #3737 SlevomatCodingStandards (#3738)
Browse files Browse the repository at this point in the history
Co-authored-by: Troy Dean <[email protected]>
  • Loading branch information
2 people authored and joeparsons committed Oct 16, 2024
1 parent ed4e0fa commit ad6307f
Show file tree
Hide file tree
Showing 27 changed files with 34 additions and 32 deletions.
2 changes: 1 addition & 1 deletion modules/custom/az_core/az_core.module
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* Contains az_core.module.
*/

use Drupal\block\Entity\Block;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Extension\Exception\UnknownExtensionException;
use Drupal\Core\Form\FormStateInterface;
Expand All @@ -14,6 +13,7 @@ use Drupal\Core\Render\BubbleableMetadata;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Url;
use Drupal\block\Entity\Block;
use Drupal\pathauto\PathautoPatternInterface;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;

Expand Down
6 changes: 3 additions & 3 deletions modules/custom/az_core/src/AZConfigOverride.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

namespace Drupal\az_core;

use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Extension\ModuleExtensionList;
use Drupal\Core\Extension\ModuleHandler;
use Drupal\az_core\Plugin\ConfigProvider\QuickstartConfigProvider;
use Drupal\config_provider\Plugin\ConfigCollector;
use Drupal\config_snapshot\ConfigSnapshotStorageTrait;
use Drupal\config_sync\ConfigSyncSnapshotter;
use Drupal\config_sync\ConfigSyncSnapshotterInterface;
use Drupal\config_update\ConfigListByProviderInterface;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Extension\ModuleExtensionList;
use Drupal\Core\Extension\ModuleHandler;
use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerAwareTrait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@

namespace Drupal\az_core\Drush\Commands;

use Drupal\az_core\Plugin\ConfigProvider\QuickstartConfigProvider;
use Drupal\Component\Diff\Diff;
use Drupal\Component\Serialization\Yaml;
use Drupal\config_provider\Plugin\ConfigCollector;
use Drupal\config_update\ConfigDiffer;
use Drupal\Core\Config\ConfigFactory;
use Drupal\Core\Config\Entity\ConfigDependencyManager;
use Drupal\Core\Config\FileStorage;
Expand All @@ -15,6 +12,9 @@
use Drupal\Core\Config\StorageInterface;
use Drupal\Core\Extension\Exception\UnknownExtensionException;
use Drupal\Core\Extension\ModuleExtensionList;
use Drupal\az_core\Plugin\ConfigProvider\QuickstartConfigProvider;
use Drupal\config_provider\Plugin\ConfigCollector;
use Drupal\config_update\ConfigDiffer;
use Drupal\user\Entity\Role;
use Drupal\user\PermissionHandler;
use Drush\Commands\DrushCommands;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
namespace Drupal\az_core\Plugin\ConfigProvider;

use Drupal\Component\Diff\Diff;
use Drupal\Core\Config\InstallStorage;
use Drupal\Core\Config\StorageInterface;
use Drupal\config_provider\Plugin\ConfigProviderBase;
use Drupal\config_snapshot\ConfigSnapshotStorageTrait;
use Drupal\config_sync\ConfigSyncSnapshotterInterface;
use Drupal\Core\Config\InstallStorage;
use Drupal\Core\Config\StorageInterface;

/**
* Class for providing configuration from a quickstart default directory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Drupal\Tests\az_core\Functional;

use Drupal\Tests\az_core\Traits\AllowDrupalLoginSetupTrait;
use Drupal\Tests\BrowserTestBase;
use Drupal\Tests\az_core\Traits\AllowDrupalLoginSetupTrait;

/**
* Provides helper methods for Quickstart tests.
Expand Down
2 changes: 1 addition & 1 deletion modules/custom/az_course/src/Form/CourseImportForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Drupal\az_course\Form;

use Drupal\az_course\CourseMigrateBatchExecutable;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\az_course\CourseMigrateBatchExecutable;
use Drupal\migrate\MigrateExecutable;
use Drupal\migrate\MigrateMessage;
use Drupal\migrate\Plugin\MigrationInterface;
Expand Down
2 changes: 1 addition & 1 deletion modules/custom/az_demo/az_demo.module
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
* Contains az_demo.module.
*/

use Drupal\block\Entity\Block;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\block\Entity\Block;

/**
* Implements hook_help().
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
* Contains az_event_trellis.module.
*/

use Drupal\az_event_trellis\Plugin\views\filter\AZEventTrellisViewsAttributeFilter;
use Drupal\az_event_trellis\TrellisHelper;
use Drupal\Component\Utility\Crypt;
use Drupal\Core\Entity\EntityFormInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Url;
use Drupal\az_event_trellis\Plugin\views\filter\AZEventTrellisViewsAttributeFilter;
use Drupal\az_event_trellis\TrellisHelper;

/**
* Implements hook_form_FORM_ID_alter() for node_az_event_edit_form.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace Drupal\az_event_trellis\Entity;

use Drupal\az_event_trellis\AZRecurringImportRuleInterface;
use Drupal\Core\Config\Entity\ConfigEntityBase;
use Drupal\az_event_trellis\AZRecurringImportRuleInterface;

/**
* Defines the recurring import rule entity type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace Drupal\az_event_trellis\EventSubscriber;

use Drupal\az_event_trellis\TrellisHelper;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Messenger\Messenger;
use Drupal\Core\Session\AccountProxy;
use Drupal\az_event_trellis\TrellisHelper;
use Drupal\migrate\Event\MigrateEvents;
use Drupal\migrate\Event\MigratePostRowSaveEvent;
use Drupal\views\ResultRow;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

namespace Drupal\az_event_trellis\Form;

use Drupal\az_event_trellis\Entity\AZRecurringImportRule;
use Drupal\Core\Entity\EntityForm;
use Drupal\Core\Form\FormStateInterface;
use Drupal\az_event_trellis\Entity\AZRecurringImportRule;
use Drupal\taxonomy\Entity\Term;
use Symfony\Component\DependencyInjection\ContainerInterface;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace Drupal\az_event_trellis\Plugin\migrate\source;

use Drupal\migrate\Plugin\migrate\source\SourcePluginBase;
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate\Plugin\migrate\source\SourcePluginBase;

/**
* Source plugin for retrieving data via Trellis events.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static function create(ContainerInterface $container, array $configuratio
/**
* {@inheritdoc}
*/
public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
public function init(ViewExecutable $view, DisplayPluginBase $display, ?array &$options = NULL) {
FieldPluginBase::init($view, $display, $options);
$this->actions = [];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace Drupal\az_event_trellis;

use Drupal\az_event_trellis\Plugin\views\filter\AZEventTrellisViewsAttributeFilter;
use Drupal\Component\Utility\Crypt;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\az_event_trellis\Plugin\views\filter\AZEventTrellisViewsAttributeFilter;
use Drupal\views\Views;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\Exception\GuzzleException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
use Drupal\Core\Render\RendererInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\Core\Template\Attribute;
use Drupal\az_finder\Service\AZFinderIcons;
use Drupal\better_exposed_filters\BetterExposedFiltersHelper;
use Drupal\better_exposed_filters\Plugin\better_exposed_filters\filter\FilterWidgetBase;
use Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid;
use Drupal\views\ViewExecutable;
use Symfony\Component\DependencyInjection\ContainerInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Drupal\az_finder\Plugin\views\exposed_form;

use Drupal\better_exposed_filters\Plugin\views\exposed_form\BetterExposedFilters;
use Drupal\Core\Form\FormStateInterface;

/**
Expand Down
2 changes: 1 addition & 1 deletion modules/custom/az_http/src/AZHttpRetryMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function __invoke(): callable {
* @return bool
* Whether to retry the request or not.
*/
public function decideRetry($retries, RequestInterface $request, ResponseInterface $response = NULL, RequestException $exception = NULL) {
public function decideRetry($retries, RequestInterface $request, ?ResponseInterface $response = NULL, ?RequestException $exception = NULL) {
// Abort if we are beyond our limit.
if ($retries >= $this->requests) {
return FALSE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class AZPoliteCacheStrategy extends PrivateCacheStrategy {
* @param int $defaultTtl
* A default TTL in absence of actual cache headers.
*/
public function __construct(CacheStorageInterface $cache = NULL, $defaultTtl = 600) {
public function __construct(?CacheStorageInterface $cache = NULL, $defaultTtl = 600) {
$this->defaultTtl = $defaultTtl;
parent::__construct($cache);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class MigratedPathLookup extends ProcessPluginBase implements ContainerFactoryPl
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration = NULL) {
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, ?MigrationInterface $migration = NULL) {
$instance = new static(
$configuration,
$plugin_id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public function __construct(array $configuration, $plugin_id, $plugin_definition
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration = NULL) {
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, ?MigrationInterface $migration = NULL) {
return new static(
$configuration,
$plugin_id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Drupal\Tests\az_paragraphs\Unit;

use Drupal\az_paragraphs\AZVideoEmbedHelper;
use Drupal\Tests\UnitTestCase;
use Drupal\az_paragraphs\AZVideoEmbedHelper;

/**
* @coversDefaultClass \Drupal\az_paragraphs\AZVideoEmbedHelper
Expand Down
2 changes: 1 addition & 1 deletion modules/custom/az_publication/az_publication.module
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* Contains az_publication.module.
*/

use Drupal\az_publication\Plugin\views\argument\AZCitationStyleArgument;
use Drupal\Core\Block\BlockPluginInterface;
use Drupal\Core\Datetime\Element\Datetime;
use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
Expand All @@ -14,6 +13,7 @@ use Drupal\Core\Entity\FieldableEntityInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Link;
use Drupal\Core\Url;
use Drupal\az_publication\Plugin\views\argument\AZCitationStyleArgument;
use Drupal\filter\Entity\FilterFormat;
use Drupal\node\Entity\NodeType;
use Drupal\node\NodeInterface;
Expand Down
2 changes: 1 addition & 1 deletion modules/custom/az_publication/src/AZAuthorStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace Drupal\az_publication;

use Drupal\az_publication\Entity\AZAuthorInterface;
use Drupal\Core\Entity\Sql\SqlContentEntityStorage;
use Drupal\Core\Language\LanguageInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\az_publication\Entity\AZAuthorInterface;

/**
* Defines the storage handler class for Author entities.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace Drupal\az_publication;

use Drupal\az_publication\Entity\AZAuthorInterface;
use Drupal\Core\Entity\ContentEntityStorageInterface;
use Drupal\Core\Language\LanguageInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\az_publication\Entity\AZAuthorInterface;

/**
* Defines the storage handler class for Author entities.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

namespace Drupal\az_publication\Controller;

use Drupal\az_publication\Entity\AZAuthorInterface;
use Drupal\Component\Utility\Xss;
use Drupal\Core\Controller\ControllerBase;
use Drupal\Core\Datetime\DateFormatterInterface;
use Drupal\Core\Link;
use Drupal\Core\Render\RendererInterface;
use Drupal\Core\Url;
use Drupal\az_publication\Entity\AZAuthorInterface;

/**
* Class AZAuthorController.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace Drupal\az_publication\Form;

use Drupal\az_publication\Entity\AZAuthorInterface;
use Drupal\Core\Form\ConfirmFormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Url;
use Drupal\az_publication\Entity\AZAuthorInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Drupal\az_publication\Form;

use Drupal\az_publication\Entity\AZAuthorInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\az_publication\Entity\AZAuthorInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
Expand Down

0 comments on commit ad6307f

Please sign in to comment.