Passed
Push — develop ( 4c7678...74dbd7 )
by Paul
02:25
created

ParamsAnnotation   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A compile() 0 2 1
A getType() 0 3 1
1
<?php
2
3
namespace PhpUnitGen\Annotation;
4
5
use PhpUnitGen\Annotation\AnnotationInterface\AnnotationInterface;
6
7
/**
8
 * Class ParamsAnnotation.
9
 *
10
 * @author     Paul Thébaud <[email protected]>.
11
 * @copyright  2017-2018 Paul Thébaud <[email protected]>.
12
 * @license    https://opensource.org/licenses/MIT The MIT license.
13
 * @link       https://github.com/paul-thebaud/phpunit-generator
14
 * @since      Class available since Release 2.0.0.
15
 */
16
class ParamsAnnotation extends AbstractAnnotation
17
{
18
    /**
19
     * {@inheritdoc}
20
     */
21
    public function getType(): int
22
    {
23
        return AnnotationInterface::TYPE_PARAMS;
24
    }
25
26
    /**
27
     * {@inheritdoc}
28
     */
29
    public function compile(): void
30
    {
31
        /*
32
        if ($this->getStringContent() !== null
33
            && ! Validator::regex('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/')
34
                ->validate($this->getStringContent())
35
        ) {
36
            throw new AnnotationParseException(sprintf(
37
                'The annotation at line %d of documentation contains an invalid property name.',
38
                $this->getLine()
39
            ));
40
        }
41
        */
42
    }
43
}
44