This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
13
{
14
use AliasTrait;
15
16
/**
17
* Configuration section.
18
*/
19
const CONFIG = 'mongo';
20
21
/**
22
* @var array
23
*/
24
protected $config = [
25
'default' => '',
26
'aliases' => [],
27
'databases' => []
28
];
29
30
/**
31
* @return string
32
*/
33
public function defaultDatabase(): string
34
{
35
return $this->config['default'];
36
}
37
38
/**
39
* @param string $database
40
*
41
* @return bool
42
*/
43
public function hasDatabase(string $database): bool
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.