@@ -89,7 +89,7 @@ |
||
89 | 89 | |
90 | 90 | $creationOptions = $viewData->getCreationOptions(); |
91 | 91 | if (isset($forms['inducements'])) { |
92 | - $inducements = array_map(function (InducementInterface $inducement) { |
|
92 | + $inducements = array_map(function(InducementInterface $inducement) { |
|
93 | 93 | return $inducement->getKey(); |
94 | 94 | }, $forms['inducements']->getData()); |
95 | 95 | $creationOptions['inducements'] = $inducements; |
@@ -17,9 +17,9 @@ |
||
17 | 17 | $builder->add('choice', ChoiceType::class, [ |
18 | 18 | 'required' => true, |
19 | 19 | 'choices' => [ |
20 | - 'obblm.forms.team.fields.skills_allowed.choices.'.AdditionalSkills::NONE => AdditionalSkills::NONE, |
|
21 | - 'obblm.forms.team.fields.skills_allowed.choices.'.AdditionalSkills::FREE => AdditionalSkills::FREE, |
|
22 | - 'obblm.forms.team.fields.skills_allowed.choices.'.AdditionalSkills::NOT_FREE => AdditionalSkills::NOT_FREE |
|
20 | + 'obblm.forms.team.fields.skills_allowed.choices.' . AdditionalSkills::NONE => AdditionalSkills::NONE, |
|
21 | + 'obblm.forms.team.fields.skills_allowed.choices.' . AdditionalSkills::FREE => AdditionalSkills::FREE, |
|
22 | + 'obblm.forms.team.fields.skills_allowed.choices.' . AdditionalSkills::NOT_FREE => AdditionalSkills::NOT_FREE |
|
23 | 23 | ], |
24 | 24 | 'expanded' => true, |
25 | 25 | ]) |
@@ -18,7 +18,7 @@ |
||
18 | 18 | { |
19 | 19 | /** @var RuleHelperInterface $helper */ |
20 | 20 | $helper = $options['helper']; |
21 | - $builder->addEventListener(FormEvents::POST_SET_DATA, function (FormEvent $event) use ($helper, $builder) { |
|
21 | + $builder->addEventListener(FormEvents::POST_SET_DATA, function(FormEvent $event) use ($helper, $builder) { |
|
22 | 22 | /** @var PlayerVersion $version */ |
23 | 23 | $version = $event->getData(); |
24 | 24 | $form = $event->getForm(); |
@@ -36,7 +36,7 @@ |
||
36 | 36 | 'placeholder' => "Choose a Position", |
37 | 37 | 'mapped' => false, |
38 | 38 | 'choice_translation_domain' => $roster->getTranslationDomain() ?? false, |
39 | - 'choice_value' => function ($choice) { |
|
39 | + 'choice_value' => function($choice) { |
|
40 | 40 | if ($choice instanceof InducementInterface) { |
41 | 41 | return $choice->getKey(); |
42 | 42 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | public function getInjuriesTable():array; |
15 | 15 | public function calculateTeamValue(TeamVersion $version, bool $excludeDisposable = false):int; |
16 | 16 | public function calculateInducementsCost(array $inducements):int; |
17 | - public function calculateTeamRate(TeamVersion $version):?int; |
|
17 | + public function calculateTeamRate(TeamVersion $version): ?int; |
|
18 | 18 | public function getMaxTeamCost(Team $team = null):int; |
19 | 19 | public function getRerollCost(Team $team):int; |
20 | 20 | public function getApothecaryCost(Team $team):int; |
@@ -13,10 +13,10 @@ discard block |
||
13 | 13 | ****************/ |
14 | 14 | interface RulePlayerInterface |
15 | 15 | { |
16 | - public function setPlayerDefaultValues(PlayerVersion $version, PositionInterface $position):?PlayerVersion; |
|
16 | + public function setPlayerDefaultValues(PlayerVersion $version, PositionInterface $position): ?PlayerVersion; |
|
17 | 17 | public function playerIsDisposable(PlayerVersion $playerVersion):bool; |
18 | 18 | public function getPlayerPosition(Player $player):PositionInterface; |
19 | - public function getInjury(string $key):?object; |
|
19 | + public function getInjury(string $key): ?object; |
|
20 | 20 | public function getAvailablePlayerKeyTypes(string $roster):array; |
21 | 21 | /** @return PositionInterface */ |
22 | 22 | public function getAvailablePlayerForTeamCreation(Team $roster); |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | /************************** |
25 | 25 | * PLAYER EVOLUTION METHOD |
26 | 26 | *************************/ |
27 | - public function getSppLevel(PlayerVersion $version):?string; |
|
28 | - public function getContextForRoll(array $roll):?array; |
|
29 | - public function getAvailableSkills(?PlayerVersion $version, array $context = null):?ArrayCollection; |
|
27 | + public function getSppLevel(PlayerVersion $version): ?string; |
|
28 | + public function getContextForRoll(array $roll): ?array; |
|
29 | + public function getAvailableSkills(?PlayerVersion $version, array $context = null): ?ArrayCollection; |
|
30 | 30 | public function getPlayerVersionExtraCosts(PlayerVersion $version):int; |
31 | 31 | public function getSkillContextForPlayerVersion(PlayerVersion $version, $skill):string; |
32 | 32 | } |
@@ -6,12 +6,12 @@ |
||
6 | 6 | |
7 | 7 | class AdditionalSkills extends Constraint |
8 | 8 | { |
9 | - const NONE=0; |
|
10 | - const FREE=1; |
|
11 | - const NOT_FREE=2; |
|
9 | + const NONE = 0; |
|
10 | + const FREE = 1; |
|
11 | + const NOT_FREE = 2; |
|
12 | 12 | |
13 | 13 | public function validatedBy() |
14 | 14 | { |
15 | - return get_class($this).'Validator'; |
|
15 | + return get_class($this) . 'Validator'; |
|
16 | 16 | } |
17 | 17 | } |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | } |
128 | 128 | } |
129 | 129 | $translator = $this->translator; |
130 | - $closure = function (Player $starPlayer) use ($translator, $rule) { |
|
130 | + $closure = function(Player $starPlayer) use ($translator, $rule) { |
|
131 | 131 | $starPlayer->setName($translator->trans($starPlayer->getName(), [], $rule->getRuleKey())); |
132 | 132 | return $starPlayer; |
133 | 133 | }; |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | $order = Criteria::create()->orderBy(['name' => 'ASC']); |
181 | 181 | |
182 | 182 | $translator = $this->translator; |
183 | - $closure = function (Skill $skill) use ($translator) { |
|
183 | + $closure = function(Skill $skill) use ($translator) { |
|
184 | 184 | $skill->setName($translator->trans($skill->getName(), [], $skill->getTranslationDomain())); |
185 | 185 | return $skill; |
186 | 186 | }; |