Passed
Pull Request — 8.x-2.x (#26)
by Frédéric G.
02:49
created
modules/mongodb_watchdog/mongodb_watchdog_event_template.page.inc 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,6 @@
 block discarded – undo
8 8
  */
9 9
 
10 10
 use Drupal\Core\Render\Element;
11
-use Drupal\Core\Link;
12
-use Drupal\Core\Url;
13 11
 
14 12
 /**
15 13
  * Prepares variables for Event template templates.
Please login to merge, or discard this patch.
modules/mongodb_watchdog/src/Entity/EventTemplate.php 2 patches
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,11 +2,11 @@
 block discarded – undo
2 2
 
3 3
 namespace Drupal\mongodb_watchdog\Entity;
4 4
 
5
-use Drupal\Core\Entity\EntityStorageInterface;
6
-use Drupal\Core\Field\BaseFieldDefinition;
7 5
 use Drupal\Core\Entity\ContentEntityBase;
8 6
 use Drupal\Core\Entity\EntityChangedTrait;
7
+use Drupal\Core\Entity\EntityStorageInterface;
9 8
 use Drupal\Core\Entity\EntityTypeInterface;
9
+use Drupal\Core\Field\BaseFieldDefinition;
10 10
 use Drupal\user\UserInterface;
11 11
 
12 12
 /**
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
  *   base_table = "mongodb_watchdog_event_template",
40 40
  *   data_table = "mongodb_watchdog_event_template_field_data",
41 41
  *   translatable = TRUE,
42
-  *   admin_permission = "administer event template entities",
42
+ *   admin_permission = "administer event template entities",
43 43
  *   entity_keys = {
44 44
  *     "id" = "id",
45 45
  *     "label" = "name",
Please login to merge, or discard this patch.
modules/mongodb_watchdog/src/EventTemplateAccessControlHandler.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,10 +2,10 @@
 block discarded – undo
2 2
 
3 3
 namespace Drupal\mongodb_watchdog;
4 4
 
5
+use Drupal\Core\Access\AccessResult;
5 6
 use Drupal\Core\Entity\EntityAccessControlHandler;
6 7
 use Drupal\Core\Entity\EntityInterface;
7 8
 use Drupal\Core\Session\AccountInterface;
8
-use Drupal\Core\Access\AccessResult;
9 9
 
10 10
 /**
11 11
  * Access controller for the Event template entity.
Please login to merge, or discard this patch.
example.settings.local.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
  * of the MongoDB features by just commenting the last line out.
10 10
  */
11 11
 
12
-$configureMongoDb = function (array $settings): array {
12
+$configureMongoDb = function(array $settings): array {
13 13
   $settings['mongodb'] = [
14 14
     'clients' => [
15 15
       // Client alias => connection constructor parameters.
Please login to merge, or discard this patch.
modules/mongodb_watchdog/tests/src/Functional/ControllerTest.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -257,7 +257,7 @@
 block discarded – undo
257 257
   /**
258 258
    * Get the log entry information form the page.
259 259
    *
260
-   * @return array
260
+   * @return callable
261 261
    *   List of entries and their information.
262 262
    */
263 263
   protected function getLogEntries() : array {
Please login to merge, or discard this patch.
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,11 +7,11 @@
 block discarded – undo
7 7
 use Drupal\Core\Logger\RfcLogLevel;
8 8
 use Drupal\Core\Site\Settings;
9 9
 use Drupal\Core\StringTranslation\StringTranslationTrait;
10
+use Drupal\Tests\BrowserTestBase;
10 11
 use Drupal\mongodb\MongoDb;
11 12
 use Drupal\mongodb_watchdog\Logger;
12
-use Drupal\Tests\BrowserTestBase;
13
-use Psr\Log\LoggerInterface;
14 13
 use Psr\Log\LogLevel;
14
+use Psr\Log\LoggerInterface;
15 15
 use Symfony\Component\HttpFoundation\Response;
16 16
 
17 17
 /**
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace Drupal\Tests\mongodb_watchdog\Functional;
6 6
 
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
    */
311 311
   protected function assertTypeCount(array $types) {
312 312
     $entries = $this->getLogEntries();
313
-    $reducer = function ($accu, $curr) {
313
+    $reducer = function($accu, $curr) {
314 314
       $accu[$curr['type'] . '-' . $curr['severity']] = [$curr['type'], $curr['severity']];
315 315
       return $accu;
316 316
     };
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
       $this->drupalPostForm(NULL, $edit, 'Filter');
573 573
 
574 574
       // Check whether the displayed event templates match our filter.
575
-      $filteredTypes = array_filter($types, function (array $type) use ($typeName) {
575
+      $filteredTypes = array_filter($types, function(array $type) use ($typeName) {
576 576
         return $type['type'] === $typeName;
577 577
       });
578 578
       $this->assertTypeCount($filteredTypes);
@@ -587,7 +587,7 @@  discard block
 block discarded – undo
587 587
       ];
588 588
       $this->drupalPostForm(NULL, $edit, 'Filter');
589 589
 
590
-      $filteredTypes = array_filter($types, function (array $type) use ($typeType, $typeSeverity) {
590
+      $filteredTypes = array_filter($types, function(array $type) use ($typeType, $typeSeverity) {
591 591
         return $type['type'] === $typeType && $type['severity'] == $typeSeverity;
592 592
       });
593 593
 
Please login to merge, or discard this patch.
modules/mongodb_watchdog/tests/src/Kernel/LoggerTest.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@
 block discarded – undo
6 6
 
7 7
 use Drupal\Core\Logger\RfcLogLevel;
8 8
 use Drupal\Core\StringTranslation\StringTranslationTrait;
9
+use Drupal\Tests\mongodb\Kernel\MongoDbTestBase;
9 10
 use Drupal\mongodb\MongoDb;
10 11
 use Drupal\mongodb_watchdog\Logger;
11
-use Drupal\Tests\mongodb\Kernel\MongoDbTestBase;
12 12
 
13 13
 /**
14 14
  * Class LoggerTest tests the logging mechanism itself.
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace Drupal\Tests\mongodb_watchdog\Kernel;
6 6
 
Please login to merge, or discard this patch.
modules/mongodb/tests/src/Kernel/MongoDbTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace Drupal\Tests\mongodb\Kernel;
6 6
 
Please login to merge, or discard this patch.
modules/mongodb/src/DatabaseFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace Drupal\mongodb;
6 6
 
Please login to merge, or discard this patch.
modules/mongodb/src/Command/SettingsCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace Drupal\mongodb\Command;
6 6
 
Please login to merge, or discard this patch.