Completed
Push — master ( 8dada4...876e9f )
by Vladimir
01:45
created

ApiFilter::acceptProperty()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 2
eloc 2
nc 2
nop 1
1
<?php
2
3
namespace allejo\Sami;
4
5
use Sami\Parser\Filter\FilterInterface;
6
use Sami\Reflection\ClassReflection;
7
use Sami\Reflection\MethodReflection;
8
use Sami\Reflection\PropertyReflection;
9
10
class ApiFilter implements FilterInterface
11
{
12
    public function acceptClass (ClassReflection $class)
13
    {
14
        return true;
15
    }
16
17
    public function acceptMethod (MethodReflection $method)
18
    {
19
        return ($method->isPublic() && empty($method->getTags('internal')));
20
    }
21
22
    public function acceptProperty (PropertyReflection $property)
23
    {
24
        return ($property->isPublic() && empty($property->getTags('internal')));
25
    }
26
}
27