@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | { |
141 | 141 | $rule = ($item instanceof CanHaveRuleInterface) ? $item->getRule() : $item; |
142 | 142 | |
143 | - if(!($rule instanceof Rule)) { |
|
143 | + if (!($rule instanceof Rule)) { |
|
144 | 144 | throw new UnexpectedTypeException(get_class($rule), Rule::class); |
145 | 145 | } |
146 | 146 | |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | * @return RuleHelperInterface|null |
183 | 183 | * @throws Exception |
184 | 184 | */ |
185 | - private function getNotCachedHelper($key):?RuleHelperInterface |
|
185 | + private function getNotCachedHelper($key): ?RuleHelperInterface |
|
186 | 186 | { |
187 | 187 | if (!isset($this->helpers[$key])) { |
188 | 188 | throw new Exception('No RuleHelperInterface found for ' . $key); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | * @return object|null |
88 | 88 | * @throws \Exception |
89 | 89 | */ |
90 | - public function getInjury($key):?object |
|
90 | + public function getInjury($key): ?object |
|
91 | 91 | { |
92 | 92 | if (!$this->getInjuries()->containsKey($key)) { |
93 | 93 | throw new NotFoundKeyException($key, 'getInjuries', self::class); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | * @param PlayerVersion $version |
104 | 104 | * @return string|null |
105 | 105 | */ |
106 | - public function getSppLevel(PlayerVersion $version):?string |
|
106 | + public function getSppLevel(PlayerVersion $version): ?string |
|
107 | 107 | { |
108 | 108 | if ($version->getSpp() && $version->getSpp() > 0) { |
109 | 109 | if ($this->getSppLevels()->containsKey($version->getSpp())) { |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | return $this->getSppLevels()->first(); |
116 | 116 | } |
117 | 117 | |
118 | - public function getContextForRoll(array $roll):?array |
|
118 | + public function getContextForRoll(array $roll): ?array |
|
119 | 119 | { |
120 | 120 | $context = null; |
121 | 121 | if (isset($roll['d6_1']) && isset($roll['d6_2'])) { |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | return $context; |
140 | 140 | } |
141 | 141 | |
142 | - public function getAvailableSkills(?PlayerVersion $version, $context = ['single', 'double']):?ArrayCollection |
|
142 | + public function getAvailableSkills(?PlayerVersion $version, $context = ['single', 'double']): ?ArrayCollection |
|
143 | 143 | { |
144 | 144 | $criteria = Criteria::create(); |
145 | 145 | if ($version) { |
@@ -6,5 +6,5 @@ |
||
6 | 6 | |
7 | 7 | interface CanHaveRuleInterface |
8 | 8 | { |
9 | - public function getRule():?Rule; |
|
9 | + public function getRule(): ?Rule; |
|
10 | 10 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | { |
14 | 14 | public function getInjuriesTable():array; |
15 | 15 | public function calculateTeamValue(TeamVersion $version, bool $excludeDisposable = false):int; |
16 | - public function calculateTeamRate(TeamVersion $version):?int; |
|
16 | + public function calculateTeamRate(TeamVersion $version): ?int; |
|
17 | 17 | public function getMaxTeamCost():int; |
18 | 18 | public function getRerollCost(Team $team):int; |
19 | 19 | public function getApothecaryCost(Team $team):int; |