Passed
Push — master ( 818b3e...c1bcf5 )
by Thierry
02:23
created

AbstractAnnotation   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 3
c 1
b 0
f 0
dl 0
loc 36
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A setPrevValue() 0 3 1
1
<?php
2
3
/**
4
 * AbstractAnnotation.php
5
 *
6
 * Common functions for Jaxon annotations.
7
 *
8
 * @package jaxon-core
0 ignored issues
show
Coding Style introduced by
Package name "jaxon-core" is not valid; consider "Jaxoncore" instead
Loading history...
9
 * @copyright 2022 Thierry Feuzeu <[email protected]>
10
 * @license https://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License
11
 * @link https://github.com/jaxon-php/jaxon-core
12
 */
0 ignored issues
show
Coding Style introduced by
PHP version not specified
Loading history...
Coding Style introduced by
Missing @category tag in file comment
Loading history...
Coding Style introduced by
Missing @author tag in file comment
Loading history...
13
14
namespace Jaxon\Annotations\Annotation;
15
16
use mindplay\annotations\Annotation;
17
18
abstract class AbstractAnnotation extends Annotation
0 ignored issues
show
Coding Style introduced by
Missing doc comment for class AbstractAnnotation
Loading history...
19
{
20
    /**
21
     * @var mixed
22
     */
23
    protected $xPrevValue = null;
0 ignored issues
show
Coding Style introduced by
Expected 1 blank line(s) before first member var; 0 found
Loading history...
24
25
    /**
26
     * Set the attribute previous value
27
     *
28
     * @param mixed $xPrevValue The previous value of the attribute
29
     *
30
     * @return void
31
     */
32
    public function setPrevValue($xPrevValue)
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines before function; 1 found
Loading history...
33
    {
34
        $this->xPrevValue = $xPrevValue;
35
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
36
37
    /**
38
     * Get the annotation name
39
     *
40
     * This is usually the corresponding option name in the Jaxon config.
41
     *
42
     * @return string
43
     */
44
    abstract public function getName(): string;
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
45
46
    /**
47
     * Get the annotation value
48
     *
49
     * For attributes with multiple values, the previous value needs to be merged with the current.
50
     *
51
     * @return mixed
52
     */
53
    abstract public function getValue();
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 0 found
Loading history...
54
}
55