ApiFilter   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 15
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A acceptClass() 0 4 1
A acceptMethod() 0 4 2
A acceptProperty() 0 4 2
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
    public function acceptMethod (MethodReflection $method)
17
    {
18
        return ($method->isPublic() && empty($method->getTags('internal')));
19
    }
20
    public function acceptProperty (PropertyReflection $property)
21
    {
22
        return ($property->isPublic() && empty($property->getTags('internal')));
23
    }
24
}
25