Skip to content

Commit 39a2ef2

Browse files
committed
Applied coding standards
1 parent 2a6898c commit 39a2ef2

File tree

7 files changed

+17
-17
lines changed

7 files changed

+17
-17
lines changed

src/Form/RetryJob.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
namespace Drupal\os2forms_failed_jobs\Form;
44

5-
use Drupal\advancedqueue\Job;
6-
use Drupal\advancedqueue\Plugin\AdvancedQueue\Backend\Database;
75
use Drupal\Core\Database\Connection;
86
use Drupal\Core\Entity\EntityTypeManager;
97
use Drupal\Core\Form\ConfirmFormBase;
108
use Drupal\Core\Form\FormStateInterface;
119
use Drupal\Core\StringTranslation\TranslatableMarkup;
1210
use Drupal\Core\Url;
11+
use Drupal\advancedqueue\Job;
12+
use Drupal\advancedqueue\Plugin\AdvancedQueue\Backend\Database;
1313
use Drupal\os2forms_failed_jobs\Helper\Helper;
1414
use Symfony\Component\DependencyInjection\ContainerInterface;
1515

@@ -85,7 +85,7 @@ public function getCancelUrl(): Url {
8585
* @phpstan-param array<string, mixed> $form
8686
* @phpstan-return array<string, mixed>
8787
*/
88-
public function buildForm(array $form, FormStateInterface $form_state, int $job_id = NULL): array {
88+
public function buildForm(array $form, FormStateInterface $form_state, ?int $job_id = NULL): array {
8989
$this->jobId = $job_id;
9090

9191
return parent::buildForm($form, $form_state);

src/Helper/Helper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
namespace Drupal\os2forms_failed_jobs\Helper;
44

5-
use Drupal\advancedqueue\Job;
65
use Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException;
76
use Drupal\Component\Plugin\Exception\PluginNotFoundException;
87
use Drupal\Core\Database\Connection;
98
use Drupal\Core\Entity\EntityInterface;
109
use Drupal\Core\Entity\EntityTypeManager;
1110
use Drupal\Core\Logger\LoggerChannelFactory;
11+
use Drupal\advancedqueue\Job;
1212
use Drupal\webform\WebformSubmissionInterface;
1313

1414
/**
@@ -275,7 +275,7 @@ public function getDataFromJob(Job $job): ?array {
275275
*
276276
* @phpstan-return array<string, mixed>
277277
*/
278-
public function getDetachedQueueSubmissionRelations(string $submissionId = NULL): array {
278+
public function getDetachedQueueSubmissionRelations(?string $submissionId = NULL): array {
279279
$query = $this->connection->select('os2forms_failed_jobs_queue_submission_relation', 'o');
280280
$query->fields('o', ['job_id', 'submission_id']);
281281
if ($submissionId) {
@@ -317,7 +317,7 @@ public function removeRelations(array $entries): void {
317317
* @param \Drupal\webform\WebformSubmissionInterface|null $submission
318318
* A webform submission.
319319
*/
320-
public function cleanUp(WebformSubmissionInterface $submission = NULL): void {
320+
public function cleanUp(?WebformSubmissionInterface $submission = NULL): void {
321321
$relations = $this->getDetachedQueueSubmissionRelations($submission?->id());
322322
$this->removeRelations($relations);
323323
}

src/Plugin/Action/RetryJob.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
namespace Drupal\os2forms_failed_jobs\Plugin\Action;
44

5-
use Drupal\advancedqueue\Entity\QueueInterface;
6-
use Drupal\advancedqueue\Job;
7-
use Drupal\advancedqueue\Plugin\AdvancedQueue\Backend\Database;
8-
use Drupal\advancedqueue\ProcessorInterface;
95
use Drupal\Core\Action\ActionBase;
106
use Drupal\Core\Entity\EntityTypeManagerInterface;
117
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
128
use Drupal\Core\Session\AccountInterface;
9+
use Drupal\advancedqueue\Entity\QueueInterface;
10+
use Drupal\advancedqueue\Job;
11+
use Drupal\advancedqueue\Plugin\AdvancedQueue\Backend\Database;
12+
use Drupal\advancedqueue\ProcessorInterface;
1313
use Drupal\os2forms_failed_jobs\Helper\Helper;
1414
use Symfony\Component\DependencyInjection\ContainerInterface;
1515

@@ -84,7 +84,7 @@ public static function create(ContainerInterface $container, $configuration, $pl
8484
/**
8585
* {@inheritdoc}
8686
*/
87-
public function execute(string $jobId = NULL): void {
87+
public function execute(?string $jobId = NULL): void {
8888
$job = $this->helper->getJobFromId($jobId);
8989
if (empty($job)) {
9090
return;
@@ -108,7 +108,7 @@ public function execute(string $jobId = NULL): void {
108108
/**
109109
* {@inheritdoc}
110110
*/
111-
public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE) {
111+
public function access($object, ?AccountInterface $account = NULL, $return_as_object = FALSE) {
112112
return TRUE;
113113
}
114114

src/Plugin/views/field/RetryOperation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
namespace Drupal\os2forms_failed_jobs\Plugin\views\field;
44

5-
use Drupal\advancedqueue\Job;
65
use Drupal\Component\Render\MarkupInterface;
76
use Drupal\Core\Session\AccountInterface;
87
use Drupal\Core\Url;
8+
use Drupal\advancedqueue\Job;
99
use Drupal\views\Plugin\views\display\DisplayPluginBase;
1010
use Drupal\views\Plugin\views\field\FieldPluginBase;
1111
use Drupal\views\Render\ViewsRenderPipelineMarkup;
@@ -27,7 +27,7 @@ class RetryOperation extends FieldPluginBase {
2727
* @phpstan-param array<string, mixed> $options
2828
* @phpstan-return void
2929
*/
30-
public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL): void {
30+
public function init(ViewExecutable $view, DisplayPluginBase $display, ?array &$options = NULL): void {
3131
parent::init($view, $display, $options);
3232

3333
$this->additional_fields['state'] = 'state';

src/Plugin/views/field/WebformId.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public static function create(ContainerInterface $container, $configuration, $pl
5757
* @phpstan-param array<string, mixed> $options
5858
* @phpstan-return void
5959
*/
60-
public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL): void {
60+
public function init(ViewExecutable $view, DisplayPluginBase $display, ?array &$options = NULL): void {
6161
parent::init($view, $display, $options);
6262

6363
$this->additional_fields['webform_id'] = [

src/Plugin/views/field/WebformSubmissionId.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public static function create(ContainerInterface $container, $configuration, $pl
5555
* @phpstan-param array<string, mixed> $options
5656
* @phpstan-return void
5757
*/
58-
public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL): void {
58+
public function init(ViewExecutable $view, DisplayPluginBase $display, ?array &$options = NULL): void {
5959
parent::init($view, $display, $options);
6060

6161
$this->additional_fields['webform_submission_id'] = [

src/Plugin/views/field/WebformSubmissionSerialId.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class WebformSubmissionSerialId extends WebformSubmissionId {
2323
* @phpstan-param array<string, mixed> $options
2424
* @phpstan-return void
2525
*/
26-
public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL): void {
26+
public function init(ViewExecutable $view, DisplayPluginBase $display, ?array &$options = NULL): void {
2727
parent::init($view, $display, $options);
2828

2929
$this->additional_fields['webform_submission_serial_id'] = 'webform_submission_serial_id';

0 commit comments

Comments
 (0)