Test Setup Failed
Push — master ( 1a9491...b3bb4f )
by Pascal
09:30
created

AnnotationClassLoader::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
namespace Skalpa\Silex\Symfony\Loader;
4
5
use Symfony\Component\Routing\Loader\AnnotationClassLoader as BaseAnnotationClassLoader;
6
use Symfony\Component\Routing\Route;
7
8
/**
9
 * Annotation loader that uses an external callable to configure routes.
10
 */
11
class AnnotationClassLoader extends BaseAnnotationClassLoader
12
{
13
    private $configurationStrategy;
14
15
    public function __construct(Reader $reader, callable $configurationStrategy)
16
    {
17
        parent::__construct($reader);
18
19
        $this->configurationStrategy = $configurationStrategy;
20
    }
21
22
    protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, $annot)
23
    {
24
        $this->configurationStrategy($route, $class, $method, $annot);
0 ignored issues
show
Bug introduced by
The method configurationStrategy() does not seem to exist on object<Skalpa\Silex\Symf...\AnnotationClassLoader>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
25
    }
26
}
27