@@ -9,7 +9,7 @@ |
||
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. |
@@ -7,11 +7,11 @@ |
||
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 | /** |
@@ -276,7 +276,7 @@ |
||
276 | 276 | /** |
277 | 277 | * Get the log entry information form the page. |
278 | 278 | * |
279 | - * @return array |
|
279 | + * @return callable |
|
280 | 280 | * List of entries and their information. |
281 | 281 | */ |
282 | 282 | protected function getLogEntries(): array { |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | */ |
330 | 330 | protected function assertTypeCount(array $types) { |
331 | 331 | $entries = $this->getLogEntries(); |
332 | - $reducer = function ($accu, $curr) { |
|
332 | + $reducer = function($accu, $curr) { |
|
333 | 333 | $accu[$curr['type'] . '-' . $curr['severity']] = [ |
334 | 334 | $curr['type'], |
335 | 335 | $curr['severity'], |
@@ -605,7 +605,7 @@ discard block |
||
605 | 605 | // Check whether the displayed event templates match our filter. |
606 | 606 | $filteredTypes = array_filter( |
607 | 607 | $types, |
608 | - function (array $type) use ($typeName) { |
|
608 | + function(array $type) use ($typeName) { |
|
609 | 609 | return $type['type'] === $typeName; |
610 | 610 | } |
611 | 611 | ); |
@@ -623,7 +623,7 @@ discard block |
||
623 | 623 | |
624 | 624 | $filteredTypes = array_filter( |
625 | 625 | $types, |
626 | - function (array $type) use ($typeType, $typeSeverity) { |
|
626 | + function(array $type) use ($typeType, $typeSeverity) { |
|
627 | 627 | return $type['type'] === $typeType && $type['severity'] == $typeSeverity; |
628 | 628 | } |
629 | 629 | ); |
@@ -6,9 +6,9 @@ |
||
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. |
@@ -1,6 +1,6 @@ discard block |
||
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 | |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | */ |
127 | 127 | public function testLogClosure() { |
128 | 128 | $logger = $this->container->get(Logger::SERVICE_LOGGER); |
129 | - $closure = function () use ($logger) { |
|
129 | + $closure = function() use ($logger) { |
|
130 | 130 | $logger->notice("This fails on PHP below 7.0, and 5.6 needs to be supported for Drupal 8. The alcaeus adapter passes the version check, but does not address this."); |
131 | 131 | return 1; |
132 | 132 | }; |
@@ -1,6 +1,6 @@ |
||
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 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Drupal\mongodb; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
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 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Drupal\mongodb\Commands; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Drupal\mongodb\Install; |
6 | 6 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Drupal\Tests\mongodb_watchdog\Unit; |
6 | 6 | |
@@ -51,30 +51,30 @@ discard block |
||
51 | 51 | $expectations = [ |
52 | 52 | // @codingStandardsIgnoreStart |
53 | 53 | // page, count, result |
54 | - [-1, 0, 0], |
|
55 | - [-1, $partial, 0], |
|
56 | - [-1, $one, 0], |
|
57 | - [-1, $oneplus, 0], |
|
58 | - [-1, $two, 0], |
|
54 | + [-1, 0, 0], |
|
55 | + [-1, $partial, 0], |
|
56 | + [-1, $one, 0], |
|
57 | + [-1, $oneplus, 0], |
|
58 | + [-1, $two, 0], |
|
59 | 59 | |
60 | - [ 0, 0, 0], |
|
61 | - [ 0, $partial, 0], |
|
62 | - [ 0, $one, 0], |
|
63 | - [ 0, $oneplus, 0], |
|
64 | - [ 0, $two, 0], |
|
60 | + [0, 0, 0], |
|
61 | + [0, $partial, 0], |
|
62 | + [0, $one, 0], |
|
63 | + [0, $oneplus, 0], |
|
64 | + [0, $two, 0], |
|
65 | 65 | |
66 | - [ 1, 0, 0], |
|
67 | - [ 1, $partial, 0], |
|
68 | - [ 1, $one, 0], |
|
69 | - [ 1, $oneplus, 1], |
|
70 | - [ 1, $two, 1], |
|
66 | + [1, 0, 0], |
|
67 | + [1, $partial, 0], |
|
68 | + [1, $one, 0], |
|
69 | + [1, $oneplus, 1], |
|
70 | + [1, $two, 1], |
|
71 | 71 | |
72 | - [ 2, 0, 0], |
|
73 | - [ 2, $partial, 0], |
|
74 | - [ 2, $one, 0], |
|
75 | - [ 2, $oneplus, 1], |
|
76 | - [ 2, $two, 1], |
|
77 | - [ 2, $twoplus, 2], |
|
72 | + [2, 0, 0], |
|
73 | + [2, $partial, 0], |
|
74 | + [2, $one, 0], |
|
75 | + [2, $oneplus, 1], |
|
76 | + [2, $two, 1], |
|
77 | + [2, $twoplus, 2], |
|
78 | 78 | // @codingStandardsIgnoreEnd |
79 | 79 | ]; |
80 | 80 | return $expectations; |