Passed
Push — master ( 661b73...ccb1dd )
by Sebastian
08:54 queued 05:17
created

DataList   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 53
ccs 13
cts 13
cp 1
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getSubsequentAuthorSubstitute() 0 3 1
A setSubsequentAuthorSubstituteRule() 0 3 1
A setSubsequentAuthorSubstitute() 0 3 1
A getSubsequentAuthorSubstituteRule() 0 3 1
1
<?php
2
/*
1 ignored issue
show
Coding Style introduced by
You must use "/**" style comments for a file comment
Loading history...
3
 * citeproc-php
4
 *
5
 * @link        http://github.com/seboettg/citeproc-php for the source repository
6
 * @copyright   Copyright (c) 2017 Sebastian Böttger.
7
 * @license     https://opensource.org/licenses/MIT
8
 */
9
10
namespace Seboettg\CiteProc\Data;
11
12
use Seboettg\CiteProc\Style\Citation;
13
use Seboettg\CiteProc\Style\Options\SubsequentAuthorSubstituteRule;
14
use Seboettg\Collection\ArrayList;
15
16
/**
17
 * Class DataList
18
 *
19
 * @package Seboettg\CiteProc\Data
20
 * @author Sebastian Böttger <[email protected]>
1 ignored issue
show
Coding Style introduced by
Tag value for @author tag indented incorrectly; expected 2 spaces but found 1
Loading history...
21
 */
3 ignored issues
show
Coding Style introduced by
Missing @category tag in class comment
Loading history...
Coding Style introduced by
Missing @license tag in class comment
Loading history...
Coding Style introduced by
Missing @link tag in class comment
Loading history...
22
class DataList extends ArrayList
23
{
24
    /**
1 ignored issue
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
25
     * @var string
26
     */
27
    private $subsequentAuthorSubstitute;
0 ignored issues
show
Coding Style introduced by
Private member variable "subsequentAuthorSubstitute" must be prefixed with an underscore
Loading history...
28
29
    /**
1 ignored issue
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
30
     * @var SubsequentAuthorSubstituteRule
31
     */
32
    private $subsequentAuthorSubstituteRule = "complete-all";
0 ignored issues
show
Coding Style introduced by
Private member variable "subsequentAuthorSubstituteRule" must be prefixed with an underscore
Loading history...
33
34
    /**
1 ignored issue
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
35
     * @var Citation
36
     */
37
    private $citation;
0 ignored issues
show
Coding Style introduced by
Private member variable "citation" must be prefixed with an underscore
Loading history...
38
39 143
    public function __construct(array $data = [], $citation = null)
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function __construct()
Loading history...
40
    {
41 143
        parent::__construct($data);
42 143
        $this->citation = $citation;
43 143
    }
44
45
    /**
1 ignored issue
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
46
     * @return string
47
     */
48 89
    public function getSubsequentAuthorSubstitute()
49
    {
50 89
        return $this->subsequentAuthorSubstitute;
51
    }
52
53
    /**
1 ignored issue
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
54
     * @param string $subsequentAuthorSubstitute
1 ignored issue
show
Coding Style introduced by
Missing parameter comment
Loading history...
55
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
56 10
    public function setSubsequentAuthorSubstitute($subsequentAuthorSubstitute)
57
    {
58 10
        $this->subsequentAuthorSubstitute = $subsequentAuthorSubstitute;
59 10
    }
60
61
    /**
1 ignored issue
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
62
     * @return SubsequentAuthorSubstituteRule
63
     */
64 89
    public function getSubsequentAuthorSubstituteRule()
65
    {
66 89
        return $this->subsequentAuthorSubstituteRule;
67
    }
68
69
    /**
1 ignored issue
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
70
     * @param SubsequentAuthorSubstituteRule $subsequentAuthorSubstituteRule
1 ignored issue
show
Coding Style introduced by
Missing parameter comment
Loading history...
71
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
72 10
    public function setSubsequentAuthorSubstituteRule(SubsequentAuthorSubstituteRule $subsequentAuthorSubstituteRule)
73
    {
74 10
        $this->subsequentAuthorSubstituteRule = $subsequentAuthorSubstituteRule;
75 10
    }
76
77
78
}