WorkerCompilerTrait::getRunManagerType()   A
last analyzed

Complexity

Conditions 3
Paths 2

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 3
eloc 5
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 9
ccs 6
cts 6
cp 1
crap 3
rs 10
1
<?php
2
3
namespace Dtc\QueueBundle\DependencyInjection\Compiler;
4
5
use Symfony\Component\DependencyInjection\ContainerBuilder;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\Depend...ection\ContainerBuilder was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
7
trait WorkerCompilerTrait
8
{
9 4
    protected function getRunManagerType(ContainerBuilder $container)
10
    {
11 4
        $managerType = 'dtc_queue.manager.job';
12 4
        if ($container->hasParameter('dtc_queue.manager.run') &&
13 4
            $container->getParameter('dtc_queue.manager.run')) {
14 4
            $managerType = 'dtc_queue.manager.run';
15
        }
16
17 4
        return $managerType;
18
    }
19
}
20