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.
Passed
Push — master ( ccd6d8...bd34e5 )
by Michael
03:02 queued 30s
created

DataStructureGuesser::getRegex()

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 1
ccs 0
cts 0
cp 0
c 0
b 0
f 0
nc 1
1
<?php
2
3
namespace MS\PHPMD\Guesser;
4
5
use PDepend\Source\AST\ASTClass;
6
use PHPMD\Node\ClassNode;
7
8
/**
9
 */
10
trait DataStructureGuesser
11
{
12
    /**
13
     * @param ClassNode|ASTClass $node
14
     *
15
     * @return bool
16
     */
17 24
    protected function isDataStructure(ClassNode $node)
18
    {
19 24
        if (!preg_match($this->getRegex('dataStructureNamespaceRegex'), $node->getNamespaceName())) {
20 13
            return false;
21
        }
22
23 11
        if (!preg_match($this->getRegex('dataStructureClassNameRegex'), $node->getName())) {
24 3
            return false;
25
        }
26
27 8
        return true;
28
    }
29
30
    /**
31
     * @param string $name
32
     *
33
     * @return string
34
     */
35
    abstract protected function getRegex($name);
36
}
37