Completed
Push — master ( 1ee05e...99144a )
by Gaetano
05:13
created

AbstractCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 75%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 19
ccs 3
cts 4
cp 0.75
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getMigrationService() 0 8 2
1
<?php
2
3
namespace Kaliop\eZMigrationBundle\Command;
4
5
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
6
7
/**
8
 * Base command class that all migration commands extend from.
9
 */
10
abstract class AbstractCommand extends ContainerAwareCommand
11
{
12
    /**
13
     * @var \Kaliop\eZMigrationBundle\Core\MigrationService
14
     */
15
    private $migrationService;
16
17
    /**
18
     * @return \Kaliop\eZMigrationBundle\Core\MigrationService
19
     */
20 76
    public function getMigrationService()
21
    {
22 76
        if (!$this->migrationService) {
23 76
            $this->migrationService = $this->getContainer()->get('ez_migration_bundle.migration_service');
24
        }
25
26
        return $this->migrationService;
27
    }
28
}
29