@@ -100,7 +100,7 @@ |
||
100 | 100 | return new RedirectResponse($targetPath); |
101 | 101 | } |
102 | 102 | // For example : return new RedirectResponse($this->urlGenerator->generate('some_route')); |
103 | - throw new Exception('TODO: provide a valid redirect inside '.__FILE__); |
|
103 | + throw new Exception('TODO: provide a valid redirect inside ' . __FILE__); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | protected function getLoginUrl() |
@@ -14,10 +14,10 @@ |
||
14 | 14 | /** @var RuleHelperInterface $helper */ |
15 | 15 | $helper = $options['rule_helper']; |
16 | 16 | $injuries = $helper->getInjuriesTable(); |
17 | - $options['choices'] = array_map(function ($injury) { |
|
17 | + $options['choices'] = array_map(function($injury) { |
|
18 | 18 | return $injury->value; |
19 | 19 | }, $injuries); |
20 | - $options['choice_value'] = function ($choice) { |
|
20 | + $options['choice_value'] = function($choice) { |
|
21 | 21 | return $choice; |
22 | 22 | }; |
23 | 23 | parent::buildForm($builder, $options); |
@@ -13,6 +13,6 @@ |
||
13 | 13 | |
14 | 14 | public function validatedBy() |
15 | 15 | { |
16 | - return get_class($this).'Validator'; |
|
16 | + return get_class($this) . 'Validator'; |
|
17 | 17 | } |
18 | 18 | } |
@@ -11,6 +11,6 @@ |
||
11 | 11 | |
12 | 12 | public function validatedBy() |
13 | 13 | { |
14 | - return get_class($this).'Validator'; |
|
14 | + return get_class($this) . 'Validator'; |
|
15 | 15 | } |
16 | 16 | } |
@@ -18,7 +18,7 @@ |
||
18 | 18 | foreach ($configs as $subConfig) { |
19 | 19 | $config = array_merge($config, $subConfig); |
20 | 20 | } |
21 | - $locator = new FileLocator(dirname(__DIR__).'/Resources/config'); |
|
21 | + $locator = new FileLocator(dirname(__DIR__) . '/Resources/config'); |
|
22 | 22 | $loader = new YamlFileLoader($container, $locator); |
23 | 23 | $loader->load('services.yaml'); |
24 | 24 |
@@ -220,7 +220,7 @@ |
||
220 | 220 | * @return RuleHelperInterface|null |
221 | 221 | * @throws Exception |
222 | 222 | */ |
223 | - private function getNotCachedHelper($key):?RuleHelperInterface |
|
223 | + private function getNotCachedHelper($key): ?RuleHelperInterface |
|
224 | 224 | { |
225 | 225 | if (!isset($this->helpers[$key])) { |
226 | 226 | throw new Exception('No RuleHelperInterface found for ' . $key); |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | return (bool) $this->rule['rosters'][$team->getRoster()]['options']['can_have_apothecary']; |
180 | 180 | } |
181 | 181 | |
182 | - public function calculateTeamRate(TeamVersion $version):?int |
|
182 | + public function calculateTeamRate(TeamVersion $version): ?int |
|
183 | 183 | { |
184 | 184 | return $this->calculateTeamValue($version) / 10000; |
185 | 185 | } |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | * @return object|null |
297 | 297 | * @throws Exception |
298 | 298 | */ |
299 | - public function getInjury($key):?object |
|
299 | + public function getInjury($key): ?object |
|
300 | 300 | { |
301 | 301 | if (!isset($this->injuries[$key])) { |
302 | 302 | throw new Exception('No Injury found for ' . $key); |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | * @param PlayerVersion $version |
313 | 313 | * @return string|null |
314 | 314 | */ |
315 | - public function getSppLevel(PlayerVersion $version):?string |
|
315 | + public function getSppLevel(PlayerVersion $version): ?string |
|
316 | 316 | { |
317 | 317 | if ($version->getSpp() >= $this->spp_levels->last()) { |
318 | 318 | return $this->spp_levels->last(); |
@@ -6,6 +6,6 @@ |
||
6 | 6 | |
7 | 7 | interface CanHaveRuleInterface |
8 | 8 | { |
9 | - public function __toString():?string; |
|
10 | - public function getRule():?Rule; |
|
9 | + public function __toString(): ?string; |
|
10 | + public function getRule(): ?Rule; |
|
11 | 11 | } |
@@ -25,11 +25,11 @@ |
||
25 | 25 | public function getAvailablePlayerTypes(string $roster):array; |
26 | 26 | |
27 | 27 | public function getInjuriesTable():array; |
28 | - public function getInjury($key):?object; |
|
29 | - public function getSppLevel(PlayerVersion $version):?string; |
|
30 | - public function setPlayerDefaultValues(PlayerVersion $version):?PlayerVersion; |
|
31 | - public function calculateTeamValue(TeamVersion $version, bool $excludeDisposable = false):?int; |
|
32 | - public function calculateTeamRate(TeamVersion $version):?int; |
|
28 | + public function getInjury($key): ?object; |
|
29 | + public function getSppLevel(PlayerVersion $version): ?string; |
|
30 | + public function setPlayerDefaultValues(PlayerVersion $version): ?PlayerVersion; |
|
31 | + public function calculateTeamValue(TeamVersion $version, bool $excludeDisposable = false): ?int; |
|
32 | + public function calculateTeamRate(TeamVersion $version): ?int; |
|
33 | 33 | public function playerIsDisposable(PlayerVersion $playerVersion):bool; |
34 | 34 | public function getMaxTeamCost():int; |
35 | 35 | public function getRerollCost(Team $team):int; |