Completed
Branch develop (598d0f)
by Benjamin
03:23
created

StarPlayer   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 14
c 1
b 0
f 0
dl 0
loc 52
rs 10
wmc 9

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setCharacteristics() 0 4 1
A getCharacteristics() 0 3 1
A setSkills() 0 4 1
A getSkills() 0 3 1
A __construct() 0 8 5
1
<?php
2
3
namespace Obblm\Core\Helper\Rule\Inducement;
4
5
use Obblm\Core\Contracts\InducementInterface;
6
7
class StarPlayer extends AbstractInducement implements InducementInterface
8
{
9
    /** @var array $characteristics */
10
    protected $characteristics;
11
    /** @var array $skills */
12
    protected $skills;
13
14
    public function __construct(array $options = [])
15
    {
16
        parent::__construct($options);
17
        if (isset($options['characteristics']) && $options['characteristics']) {
18
            $this->setCharacteristics($options['characteristics']);
19
        }
20
        if (isset($options['skills']) && $options['skills']) {
21
            $this->setSkills($options['skills']);
22
        }
23
    }
24
25
    /**
26
     * @return array
27
     */
28
    public function getCharacteristics(): ?array
29
    {
30
        return $this->characteristics;
31
    }
32
33
    /**
34
     * @param array|null $characteristics
35
     * @return $this
36
     */
37
    public function setCharacteristics(?array $characteristics): self
38
    {
39
        $this->characteristics = $characteristics;
40
        return $this;
41
    }
42
43
    /**
44
     * @return array
45
     */
46
    public function getSkills(): ?array
47
    {
48
        return $this->skills;
49
    }
50
51
    /**
52
     * @param array|null $skills
53
     * @return $this
54
     */
55
    public function setSkills(?array $skills): self
56
    {
57
        $this->skills = $skills;
58
        return $this;
59
    }
60
}
61