Total Complexity | 4 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | trait WithSkipSetters |
||
17 | { |
||
18 | |||
19 | /** @var bool If the number of teams is less than $this->inGame, then skip playing this round */ |
||
20 | private bool $allowSkip = false; |
||
21 | |||
22 | |||
23 | /** |
||
24 | * Allows round skipping |
||
25 | * |
||
26 | * @return $this |
||
27 | */ |
||
28 | 32 | public function allowSkip() : WithSkipSettersInterface { |
|
29 | 32 | $this->allowSkip = true; |
|
30 | 32 | return $this; |
|
31 | } |
||
32 | |||
33 | /** |
||
34 | * Disallow round skipping |
||
35 | * |
||
36 | * @return $this |
||
37 | */ |
||
38 | 4 | public function disallowSkip() : WithSkipSettersInterface { |
|
39 | 4 | $this->allowSkip = false; |
|
40 | 4 | return $this; |
|
41 | } |
||
42 | |||
43 | /** |
||
44 | * Set round skipping |
||
45 | * |
||
46 | * @param bool $skip |
||
47 | * |
||
48 | * @return $this |
||
49 | */ |
||
50 | 191 | public function setSkip(bool $skip) : WithSkipSettersInterface { |
|
51 | 191 | $this->allowSkip = $skip; |
|
52 | 191 | return $this; |
|
53 | } |
||
54 | |||
55 | /** |
||
56 | * Getter for round skipping |
||
57 | * |
||
58 | * @return bool |
||
59 | */ |
||
60 | 154 | public function getSkip() : bool { |
|
62 | } |
||
63 | } |