ReflectionFactory::createReflectionClass()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Knp\RadBundle\Reflection;
4
5
class ReflectionFactory
6
{
7
    public function createReflectionClass($class)
8
    {
9
        return new \ReflectionClass($class);
10
    }
11
12
    public function getParameters($controller)
13
    {
14
        if (is_array($controller)) {
15
            $r = new \ReflectionMethod($controller[0], $controller[1]);
16
        } else {
17
            $r = new \ReflectionFunction($controller);
18
        }
19
20
        return $r->getParameters();
21
    }
22
}
23