AbstractCommand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 17
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A getWorkflowService() 0 7 2
1
<?php
2
3
namespace Kaliop\eZWorkflowEngineBundle\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\eZWorkflowEngineBundle\Core\WorkflowServiceFacade
14
     */
15
    private $workflowService;
16
17
    /**
18
     * @return \Kaliop\eZWorkflowEngineBundle\Core\WorkflowServiceFacade
19
     */
20
    public function getWorkflowService()
21
    {
22
        if (!$this->workflowService) {
23
            $this->workflowService = $this->getContainer()->get('ez_workflowengine_bundle.workflow_service');
24
        }
25
26
        return $this->workflowService;
27
    }
28
}
29