@@ -7,7 +7,7 @@ |
||
| 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. |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | /** |
| 36 | 36 | * Constructor. |
| 37 | 37 | * |
| 38 | - * @param \MongoDB $database |
|
| 38 | + * @param Database $database |
|
| 39 | 39 | * The watchdog database. |
| 40 | 40 | * @param \Drupal\mongodb_watchdog\Logger $logger |
| 41 | 41 | */ |
@@ -9,15 +9,14 @@ |
||
| 9 | 9 | use Drupal\Component\Utility\SafeMarkup; |
| 10 | 10 | use Drupal\Component\Utility\Unicode; |
| 11 | 11 | use Drupal\Core\Controller\ControllerBase; |
| 12 | +use Drupal\Core\Extension\ModuleHandlerInterface; |
|
| 13 | +use Drupal\Core\Form\FormBuilderInterface; |
|
| 12 | 14 | use Drupal\Core\Url; |
| 13 | -use Drupal\mongodb\Connection; |
|
| 14 | 15 | use Drupal\mongodb_watchdog\Logger; |
| 15 | 16 | use MongoDB\Database; |
| 16 | -use Psr\Log\LoggerInterface; |
|
| 17 | 17 | use Psr\Log\LogLevel; |
| 18 | +use Psr\Log\LoggerInterface; |
|
| 18 | 19 | use Symfony\Component\DependencyInjection\ContainerInterface; |
| 19 | -use Drupal\Core\Extension\ModuleHandlerInterface; |
|
| 20 | -use Drupal\Core\Form\FormBuilderInterface; |
|
| 21 | 20 | |
| 22 | 21 | |
| 23 | 22 | /** |
@@ -120,8 +120,6 @@ |
||
| 120 | 120 | /** |
| 121 | 121 | * Load a MongoDB watchdog event. |
| 122 | 122 | * |
| 123 | - * @param string $id |
|
| 124 | - * The string representation of a MongoId. |
|
| 125 | 123 | * |
| 126 | 124 | * @return \Drupal\mongodb_watchdog\Event|bool |
| 127 | 125 | * FALSE if the event cannot be loaded. |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | /** |
| 38 | 38 | * Constructor. |
| 39 | 39 | * |
| 40 | - * @param \MongoDB $database |
|
| 40 | + * @param \MongoDB\Database $database |
|
| 41 | 41 | * The watchdog database. |
| 42 | 42 | * @param \Drupal\mongodb_watchdog\Logger $logger |
| 43 | 43 | */ |
@@ -6,15 +6,13 @@ |
||
| 6 | 6 | |
| 7 | 7 | namespace Drupal\mongodb_watchdog\Form; |
| 8 | 8 | |
| 9 | -use Drupal\Core\Form\FormBase; |
|
| 10 | -use Drupal\Core\Form\FormStateInterface; |
|
| 11 | 9 | use Drupal\Component\Utility\SafeMarkup; |
| 12 | 10 | use Drupal\Component\Utility\Unicode; |
| 13 | 11 | use Drupal\Core\DependencyInjection\ContainerInjectionInterface; |
| 12 | +use Drupal\Core\Form\FormBase; |
|
| 13 | +use Drupal\Core\Form\FormStateInterface; |
|
| 14 | 14 | use Drupal\Core\Url; |
| 15 | -use Drupal\mongodb\Connection; |
|
| 16 | 15 | use Drupal\mongodb_watchdog\Logger; |
| 17 | -use Psr\Log\LoggerInterface; |
|
| 18 | 16 | use Symfony\Component\DependencyInjection\ContainerInterface; |
| 19 | 17 | |
| 20 | 18 | /** |
@@ -188,9 +188,9 @@ |
||
| 188 | 188 | if ($value['type'] == 'php' && $value['message'] == '%type: %message in %function (line %line of %file).') { |
| 189 | 189 | $collection = $this->logger->eventCollection($value['_id']); |
| 190 | 190 | $result = $collection->find() |
| 191 | - ->sort(array('$natural' => -1)) |
|
| 192 | - ->limit(1) |
|
| 193 | - ->getNext(); |
|
| 191 | + ->sort(array('$natural' => -1)) |
|
| 192 | + ->limit(1) |
|
| 193 | + ->getNext(); |
|
| 194 | 194 | if ($value) { |
| 195 | 195 | $value['file'] = basename($result['variables']['%file']); |
| 196 | 196 | $value['line'] = $result['variables']['%line']; |
@@ -144,6 +144,7 @@ |
||
| 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 | */ |
@@ -2,9 +2,9 @@ |
||
| 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; |