Completed
Branch 9-watchdog_detail_controller (256ca8)
by Frédéric G.
04:18
created
modules/mongodb_watchdog/mongodb_watchdog.admin.inc 2 patches
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -214,6 +214,8 @@
 block discarded – undo
214 214
 
215 215
 /**
216 216
  * Initialize the global pager variables for use in a mongodb_watchdog event list.
217
+ * @param integer $element
218
+ * @param integer $limit
217 219
  */
218 220
 function mongodb_watchdog_pager_init($element, $limit, $total) {
219 221
   global $pager_page_array, $pager_total, $pager_total_items;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
       ->find(mongodb_watchdog_build_filter_query())
97 97
       ->count();
98 98
     $pager_total[0] = ceil($pager_total_items[0] / $per_page);
99
-    $pager_page_array[0] = max(0, min((int) $pager_page_array[0], ((int)$pager_total[0]) - 1));
99
+    $pager_page_array[0] = max(0, min((int) $pager_page_array[0], ((int) $pager_total[0]) - 1));
100 100
     $pager_limits[0] = $per_page;
101 101
     $build['pager'] = array(
102 102
       '#theme' => 'pager',
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
   }
227 227
   $pager_total_items[$element] = $total;
228 228
   $pager_total[$element] = ceil($pager_total_items[$element] / $limit);
229
-  $pager_page_array[$element] = max(0, min((int)$pager_page_array[$element], ((int)$pager_total[$element]) - 1));
229
+  $pager_page_array[$element] = max(0, min((int) $pager_page_array[$element], ((int) $pager_total[$element]) - 1));
230 230
   return isset($pager_page_array[$element]) ? $pager_page_array[$element] : 0;
231 231
 }
232 232
 
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
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
  */
8 8
 
9 9
 if (!function_exists('configure_mongodb')) {
10
-  function configure_mongodb(\Drupal\Core\Site\Settings &$settings) {
10
+  function configure_mongodb(\Drupal\Core\Site\Settings & $settings) {
11 11
     $settings['mongodb'] = [
12 12
       'clients' => [
13 13
         // Client alias => constructor parameters.
Please login to merge, or discard this patch.
modules/mongodb_watchdog/src/Controller/TopController.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -144,6 +144,7 @@
 block discarded – undo
144 144
   /**
145 145
    * Generic controller for admin/reports/mongodb/<top report>.
146 146
    *
147
+   * @param string $type
147 148
    * @return array
148 149
    *   A render array.
149 150
    */
Please login to merge, or discard this patch.
modules/mongodb_watchdog/src/Form/ClearConfirmForm.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@
 block discarded – undo
2 2
 
3 3
 namespace Drupal\mongodb_watchdog\Form;
4 4
 
5
+use Drupal\Core\Form\ConfirmFormBase;
5 6
 use Drupal\Core\Form\FormStateInterface;
6 7
 use Drupal\Core\Url;
7
-use Drupal\Core\Form\ConfirmFormBase;
8 8
 use Drupal\mongodb_watchdog\Logger;
9 9
 use MongoDB\Database;
10 10
 use Symfony\Component\DependencyInjection\ContainerInterface;
Please login to merge, or discard this patch.
modules/mongodb_watchdog/src/Controller/AdminController.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,9 +43,9 @@
 block discarded – undo
43 43
   /**
44 44
    * Constructor.
45 45
    *
46
-   * @param \MongoDB $database
46
+   * @param Database $database
47 47
    *   The watchdog database.
48
-   * @param \Psr\Log\LoggerInterface $logger
48
+   * @param Logger $logger
49 49
    *   The logger service, to log intervening events.
50 50
    * @param \Drupal\mongodb_watchdog\Logger $watchdog
51 51
    *   The MongoDB logger, to load stored events.
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,14 +8,11 @@
 block discarded – undo
8 8
 
9 9
 use Drupal\Component\Utility\Unicode;
10 10
 use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
11
-use Drupal\Core\Template\Attribute;
12 11
 use Drupal\Core\Url;
13
-use Drupal\mongodb\Connection;
14
-use Drupal\mongodb_watchdog\EventTemplate;
15 12
 use Drupal\mongodb_watchdog\Logger;
16 13
 use MongoDB\Database;
17
-use Psr\Log\LoggerInterface;
18 14
 use Psr\Log\LogLevel;
15
+use Psr\Log\LoggerInterface;
19 16
 use Symfony\Component\DependencyInjection\ContainerInterface;
20 17
 
21 18
 /**
Please login to merge, or discard this patch.
modules/mongodb_watchdog/src/Controller/DetailController.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
7 7
 use Drupal\Core\Template\Attribute;
8 8
 use Drupal\mongodb_watchdog\EventController;
9
-use Drupal\mongodb_watchdog\EventTemplate;use Drupal\mongodb_watchdog\Logger;
9
+use Drupal\mongodb_watchdog\EventTemplate;
10 10
 use Psr\Log\LoggerInterface;
11 11
 use Symfony\Component\DependencyInjection\ContainerInterface;
12 12
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
7 7
 use Drupal\Core\Template\Attribute;
8 8
 use Drupal\mongodb_watchdog\EventController;
9
-use Drupal\mongodb_watchdog\EventTemplate;use Drupal\mongodb_watchdog\Logger;
9
+use Drupal\mongodb_watchdog\EventTemplate; use Drupal\mongodb_watchdog\Logger;
10 10
 use Psr\Log\LoggerInterface;
11 11
 use Symfony\Component\DependencyInjection\ContainerInterface;
12 12
 
Please login to merge, or discard this patch.
modules/mongodb_watchdog/src/EventTemplate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
       'severity' => [
73 73
         'label' => t('Severity'),
74 74
         'creation_callback' => 'intval',
75
-        'display_callback' => function ($level) {
75
+        'display_callback' => function($level) {
76 76
           return RfcLogLevel::getLevels()[$level];
77 77
         },
78 78
       ],
Please login to merge, or discard this patch.