@@ -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 | } |
@@ -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 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | $config = array_merge($config, $subConfig); |
33 | 33 | } |
34 | 34 | } |
35 | - $locator = new FileLocator(dirname(__DIR__).'/Resources/config'); |
|
35 | + $locator = new FileLocator(dirname(__DIR__) . '/Resources/config'); |
|
36 | 36 | $loader = new YamlFileLoader($container, $locator); |
37 | 37 | $loader->load('services.yaml'); |
38 | 38 |
@@ -99,7 +99,7 @@ |
||
99 | 99 | return (bool) $roster->canHaveApothecary(); |
100 | 100 | } |
101 | 101 | |
102 | - public function calculateTeamRate(TeamVersion $version):?int |
|
102 | + public function calculateTeamRate(TeamVersion $version): ?int |
|
103 | 103 | { |
104 | 104 | return $this->calculateTeamValue($version) / 10000; |
105 | 105 | } |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | * @return object|null |
86 | 86 | * @throws \Exception |
87 | 87 | */ |
88 | - public function getInjury($key):?object |
|
88 | + public function getInjury($key): ?object |
|
89 | 89 | { |
90 | 90 | if (!$this->getInjuries()->containsKey($key)) { |
91 | 91 | throw new \Exception('No Injury found for ' . $key); |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | * @param PlayerVersion $version |
102 | 102 | * @return string|null |
103 | 103 | */ |
104 | - public function getSppLevel(PlayerVersion $version):?string |
|
104 | + public function getSppLevel(PlayerVersion $version): ?string |
|
105 | 105 | { |
106 | 106 | if ($version->getSpp() && $version->getSpp() > 0) { |
107 | 107 | if ($this->getSppLevels()->containsKey($version->getSpp())) { |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | return $this->getSppLevels()->first(); |
114 | 114 | } |
115 | 115 | |
116 | - public function getContextForRoll(array $roll):?array |
|
116 | + public function getContextForRoll(array $roll): ?array |
|
117 | 117 | { |
118 | 118 | $context = null; |
119 | 119 | if (isset($roll['d6_1']) && isset($roll['d6_2'])) { |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | return $context; |
138 | 138 | } |
139 | 139 | |
140 | - public function getAvailableSkills(?PlayerVersion $version, $context = ['single', 'double']):?ArrayCollection |
|
140 | + public function getAvailableSkills(?PlayerVersion $version, $context = ['single', 'double']): ?ArrayCollection |
|
141 | 141 | { |
142 | 142 | $criteria = Criteria::create(); |
143 | 143 | if ($version) { |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | * CACHING |
68 | 68 | *********/ |
69 | 69 | |
70 | - public function getAttachedRule():?Rule |
|
70 | + public function getAttachedRule(): ?Rule |
|
71 | 71 | { |
72 | 72 | return $this->attachedRule; |
73 | 73 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | return $weather; |
132 | 132 | } |
133 | 133 | |
134 | - public function createInducementAsPlayer(InducementInterface $inducement, $number = 0):?Player |
|
134 | + public function createInducementAsPlayer(InducementInterface $inducement, $number = 0): ?Player |
|
135 | 135 | { |
136 | 136 | if (!$inducement instanceof StarPlayer) { |
137 | 137 | return null; |
@@ -123,7 +123,7 @@ |
||
123 | 123 | $alpha = Criteria::create() |
124 | 124 | ->orderBy(['key' => 'ASC']); |
125 | 125 | $skills = $helper->getSkills()->matching($alpha); |
126 | - return array_map(function (Skill $skill) use ($rule) { |
|
126 | + return array_map(function(Skill $skill) use ($rule) { |
|
127 | 127 | return [ |
128 | 128 | 'name' => $skill->getTranslationKey(), |
129 | 129 | 'type' => $skill->getTypeTranslationKey(), |
@@ -12,7 +12,7 @@ |
||
12 | 12 | parent::__construct($this->getVersionMessage($on)); |
13 | 13 | } |
14 | 14 | |
15 | - private function getVersionMessage(object $on):?string |
|
15 | + private function getVersionMessage(object $on): ?string |
|
16 | 16 | { |
17 | 17 | if ($on instanceof Team) { |
18 | 18 | return "No version available for team : " . $on->getName(); |
@@ -10,16 +10,16 @@ |
||
10 | 10 | ****************/ |
11 | 11 | interface PlayerRuleInterface |
12 | 12 | { |
13 | - public function setPlayerDefaultValues(PlayerVersion $version):?PlayerVersion; |
|
13 | + public function setPlayerDefaultValues(PlayerVersion $version): ?PlayerVersion; |
|
14 | 14 | public function playerIsDisposable(PlayerVersion $playerVersion):bool; |
15 | - public function getInjury(string $key):?object; |
|
15 | + public function getInjury(string $key): ?object; |
|
16 | 16 | public function getAvailablePlayerKeyTypes(string $roster):array; |
17 | 17 | public function getAvailablePlayerTypes(string $roster):array; |
18 | 18 | |
19 | 19 | /************************** |
20 | 20 | * PLAYER EVOLUTION METHOD |
21 | 21 | *************************/ |
22 | - public function getSppLevel(PlayerVersion $version):?string; |
|
23 | - public function getContextForRoll(array $roll):?array; |
|
24 | - public function getAvailableSkills(?PlayerVersion $version, array $context = null):?ArrayCollection; |
|
22 | + public function getSppLevel(PlayerVersion $version): ?string; |
|
23 | + public function getContextForRoll(array $roll): ?array; |
|
24 | + public function getAvailableSkills(?PlayerVersion $version, array $context = null): ?ArrayCollection; |
|
25 | 25 | } |