Failed Conditions
Push — master ( 07d765...457451 )
by Jonathan
39s
created

StaticReflectionService::getAccessibleProperty()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 2
crap 1
1
<?php
2
namespace Doctrine\Common\Persistence\Mapping;
3
4
/**
5
 * PHP Runtime Reflection Service.
6
 *
7
 * @author Benjamin Eberlei <[email protected]>
8
 */
9
class StaticReflectionService implements ReflectionService
10
{
11
    /**
12
     * {@inheritDoc}
13
     */
14 1
    public function getParentClasses($class)
15
    {
16 1
        return [];
17
    }
18
19
    /**
20
     * {@inheritDoc}
21
     */
22 1
    public function getClassShortName($className)
23
    {
24 1
        if (strpos($className, '\\') !== false) {
25 1
            $className = substr($className, strrpos($className, "\\") + 1);
26
        }
27 1
        return $className;
28
    }
29
30
    /**
31
     * {@inheritDoc}
32
     */
33 1
    public function getClassNamespace($className)
34
    {
35 1
        $namespace = '';
36 1
        if (strpos($className, '\\') !== false) {
37 1
            $namespace = strrev(substr(strrev($className), strpos(strrev($className), '\\') + 1));
38
        }
39 1
        return $namespace;
40
    }
41
42
    /**
43
     * {@inheritDoc}
44
     */
45 1
    public function getClass($class)
46
    {
47 1
        return null;
48
    }
49
50
    /**
51
     * {@inheritDoc}
52
     */
53 1
    public function getAccessibleProperty($class, $property)
54
    {
55 1
        return null;
56
    }
57
58
    /**
59
     * {@inheritDoc}
60
     */
61 1
    public function hasPublicMethod($class, $method)
62
    {
63 1
        return true;
64
    }
65
}
66