@@ -19,7 +19,7 @@ |
||
19 | 19 | /********** |
20 | 20 | * CACHING |
21 | 21 | *********/ |
22 | - public function getAttachedRule():?Rule; |
|
22 | + public function getAttachedRule(): ?Rule; |
|
23 | 23 | public function setAttachedRule(Rule $rule):self; |
24 | 24 | |
25 | 25 | /*************** |
@@ -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 | } |
@@ -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; |
@@ -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(); |
@@ -92,7 +92,7 @@ |
||
92 | 92 | /** |
93 | 93 | * @return array |
94 | 94 | */ |
95 | - public function getInducementOptions():?array |
|
95 | + public function getInducementOptions(): ?array |
|
96 | 96 | { |
97 | 97 | return $this->inducementOptions; |
98 | 98 | } |
@@ -100,7 +100,7 @@ |
||
100 | 100 | return new RedirectResponse($request->request->get('_target_path')); |
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() |