MultiUseCaseKernel::configureOptions()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 12
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 14
ccs 12
cts 12
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 8
nc 1
nop 1
crap 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