DocumentManagerHelper   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 25
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getDocumentManager() 0 4 1
A getName() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\ODM\MongoDB\Tools\Console\Helper;
6
7
use Doctrine\ODM\MongoDB\DocumentManager;
8
use Symfony\Component\Console\Helper\Helper;
9
10
/**
11
 * Symfony console component helper for accessing a DocumentManager instance.
12
 */
13
class DocumentManagerHelper extends Helper
14
{
15
    /** @var DocumentManager */
16
    protected $dm;
17
18
    public function __construct(DocumentManager $dm)
19
    {
20
        $this->dm = $dm;
21
    }
22
23
    public function getDocumentManager() : DocumentManager
24
    {
25
        return $this->dm;
26
    }
27
28
    /**
29
     * Get the canonical name of this helper.
30
     *
31
     * @see \Symfony\Component\Console\Helper\HelperInterface::getName()
32
     */
33
    public function getName() : string
34
    {
35
        return 'documentManager';
36
    }
37
}
38