Completed
Push — 14-watchdog_capped ( eda19a...541f64 )
by Frédéric G.
06:05
created

example.settings.local.php (4 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
0 ignored issues
show
Coding Style Compatibility introduced by
For compatibility and reusability of your code, PSR1 recommends that a file should introduce either new symbols (like classes, functions, etc.) or have side-effects (like outputting something, or including other files), but not both at the same time. The first symbol is defined on line 10 and the first side effect is on line 29.

The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.

The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.

To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.

Loading history...
2
/**
3
 * @file
4
 * Example settings to connect to MongoDB.
5
 *
6
 * This is the default data to add to your settings.local.php.
7
 */
8
9
if (!function_exists('configure_mongodb')) {
10
  function configure_mongodb(\Drupal\Core\Site\Settings &$settings) {
0 ignored issues
show
Missing function doc comment
Loading history...
11
    $settings['mongodb'] = [
12
      'clients' => [
13
        // Client alias => constructor parameters.
14
        'default' => [
15
          'uri' => 'mongodb://macos:27017',
16
          'uriOptions' => [],
17
          'driverOptions' => [],
18
        ],
19
      ],
20
      'databases' => [
21
        // Collection alias => [ client_alias, collection_name ]
22
        'default' => ['default', 'drupal'],
23
        'logger' => ['default', 'logger'],
24
      ],
25
    ];
26
  }
27
}
28
29
configure_mongodb($settings);
0 ignored issues
show
Variable $settings is undefined.
Loading history...
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
30