Completed
Push — master ( f113dc...290d49 )
by Gaetano
17:56 queued 14:34
created

AbstractCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 19
ccs 4
cts 4
cp 1
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 78
    public function getMigrationService()
21
    {
22 78
        if (!$this->migrationService) {
23 78
            $this->migrationService = $this->getContainer()->get('ez_migration_bundle.migration_service');
24
        }
25
26 78
        return $this->migrationService;
27
    }
28
}
29