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

MultipleStarPlayer   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A isMultiple() 0 3 1
A getParts() 0 3 1
A __construct() 0 5 3
A setParts() 0 4 1
1
<?php
2
3
namespace Obblm\Core\Helper\Rule\Inducement;
4
5
use Obblm\Core\Contracts\InducementInterface;
6
7
class MultipleStarPlayer extends AbstractInducement implements InducementInterface
8
{
9
    protected $parts = [];
10
11
    public function __construct(array $options = [])
12
    {
13
        parent::__construct($options);
14
        if (isset($options['parts']) && $options['parts']) {
15
            $this->setParts($options['parts']);
16
        }
17
    }
18
19
    public function isMultiple(): bool
20
    {
21
        return true;
22
    }
23
24
    public function setParts(array $parts):self
25
    {
26
        $this->parts = $parts;
27
        return $this;
28
    }
29
30
    public function getParts():array
31
    {
32
        return $this->parts;
33
    }
34
}
35