AbstractTeam   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 58
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getId() 0 4 1
A getName() 0 4 1
A setName() 0 6 1
A __toString() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the rafrsr/lib-array2object package.
5
 *
6
 * (c) Rafael SR <https://github.com/rafrsr>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
namespace Rafrsr\LibArray2Object\Tests\Fixtures;
12
13
/**
14
 * Class AbstractTeam.
15
 */
16
abstract class AbstractTeam
17
{
18
    /**
19
     * @var int
20
     */
21
    protected $id;
22
23
    /**
24
     * @var string
25
     */
26
    protected $name;
27
28
    /**
29
     * AbstractTeam constructor.
30
     *
31
     * @param string $name
32
     */
33
    public function __construct($name = null)
34
    {
35
        $this->name = $name;
36
    }
37
38
    /**
39
     * @return int
40
     */
41
    public function getId()
42
    {
43
        return $this->id;
44
    }
45
46
    /**
47
     * @return string
48
     */
49
    public function getName()
50
    {
51
        return $this->name;
52
    }
53
54
    /**
55
     * @param string $name
56
     *
57
     * @return $this
58
     */
59
    public function setName($name)
60
    {
61
        $this->name = $name;
62
63
        return $this;
64
    }
65
66
    /**
67
     * {@inheritdoc}
68
     */
69
    public function __toString()
70
    {
71
        return (string) $this->getName();
72
    }
73
}
74