MultiUseCaseKernel   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A configureOptions() 0 14 1
1
<?php
2
/**
3
 * This file is part of the Axstrad Library
4
 *
5
 * Copyright (c) 2015 Dan Kempster
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * Feel free to edit as you please, and have fun.
11
 *
12
 * @author Dan Kempster <[email protected]>
13
 */
14
15
namespace Axstrad\Bundle\UseCaseTestBundle\Kernel;
16
17
use Axstrad\Bundle\UseCaseTestBundle\Test\MultiUseCaseTest;
18
use Symfony\Component\OptionsResolver\Options;
19
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
20
21
/**
22
 * Axstrad\Bundle\UseCaseTestBundle\Kernel\MultiUseCaseKernel
23
 */
24
final class MultiUseCaseKernel extends AbstractKernel
25
{
26
    /**
27
     */
28 6
    public static function configureOptions(OptionsResolverInterface $resolver)
29
    {
30 6
        parent::configureOptions($resolver);
31
32 6
        $resolver->setRequired(array('root_dir'));
33 6
        $resolver->setDefaults(array(
34 6
            'root_dir' => function(Options $options) {
35 6
                return MultiUseCaseTest::getAbsoluteUseCasesDir().
36 6
                    DIRECTORY_SEPARATOR.
37 6
                    $options['use_case']
38 6
                ;
39 6
            },
40 6
        ));
41 6
    }
42
}
43