Passed
Push — fix/feeds ( f36187...76a0f8 )
by Arnaud
13:25 queued 09:37
created

Term::sortByDate()   A

Complexity

Conditions 3
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 3

Importance

Changes 0
Metric Value
cc 3
eloc 4
nc 1
nop 0
dl 0
loc 8
ccs 4
cts 4
cp 1
crap 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * This file is part of the Cecil/Cecil package.
4
 *
5
 * Copyright (c) Arnaud Ligny <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Cecil\Collection\Taxonomy;
12
13
use Cecil\Collection\ItemInterface;
14
use Cecil\Collection\Page\Collection as CecilCollection;
15
16
/**
17
 * Class Term.
18
 */
19
class Term extends CecilCollection implements ItemInterface
20
{
21
    /** @var string Term's name. */
22
    protected $name;
23
24
    /**
25
     * Set term's name.
26
     *
27
     * @param string $value
28
     *
29
     * @return self
30
     */
31
    public function setName(string $value): self
32
    {
33
        $this->name = $value;
34
35
        return $this;
36
    }
37
38
    /**
39
     * Get term's name.
40
     *
41
     * @return string|null
42
     */
43
    public function getName(): ?string
44
    {
45
        return $this->name;
46
    }
47
}
48