| 1 | <?php |
||
| 16 | class DatabaseFactory { |
||
| 17 | |||
| 18 | /** |
||
| 19 | * The Client factory service. |
||
| 20 | * |
||
| 21 | * @var \Drupal\mongodb\ClientFactory |
||
| 22 | */ |
||
| 23 | protected $clientFactory; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * The 'mongodb' database settings array. |
||
| 27 | * |
||
| 28 | * @var string[][] |
||
| 29 | */ |
||
| 30 | protected $settings; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Constructor. |
||
| 34 | * |
||
| 35 | * @param \Drupal\mongodb\ClientFactory $client_factory |
||
| 36 | * The Client factory service. |
||
| 37 | */ |
||
| 38 | public function __construct(ClientFactory $client_factory, Settings $settings) { |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Return the MongoDB database matching an alias. |
||
| 45 | * |
||
| 46 | * @param string $alias |
||
| 47 | * The alias string, like "default". |
||
| 48 | * |
||
| 49 | * @return \MongoDB\Database|null |
||
| 50 | * The selected database, or NULL if an error occurred. |
||
| 51 | */ |
||
| 52 | public function get($alias) { |
||
| 67 | } |
||
| 68 |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.