GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Test Failed
Push — master ( ea3c3c...758782 )
by Michael
03:51
created

PublicFieldDeclaration   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
c 1
b 0
f 1
lcom 0
cbo 2
dl 0
loc 15
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A apply() 0 9 3
1
<?php
2
3
namespace MS\PHPMD\Rule\CleanCode;
4
5
use PDepend\Source\AST\ASTFieldDeclaration;
6
use PHPMD\AbstractNode;
7
use PHPMD\AbstractRule;
8
use PHPMD\Node\ClassNode;
9
use PHPMD\Rule\ClassAware;
10
11
/**
12
 * Try to avoid public class variables. Use Getter to access the variable.
13
 */
14
class PublicFieldDeclaration extends AbstractRule implements ClassAware
15
{
16
    /**
17
     * @param AbstractNode|ClassNode $node
18
     */
19
    public function apply(AbstractNode $node)
20
    {
21
        /** @var ASTFieldDeclaration $field */
22
        foreach ($node->findChildrenOfType('FieldDeclaration') as $field) {
23
            if (true === $field->isPublic()) {
24
                $this->addViolation($field);
25
            }
26
        }
27
    }
28
}
29