@@ -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); |
@@ -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 | } |
@@ -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 | } |
@@ -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; |
@@ -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) { |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | try { |
30 | 30 | $filesystem->remove($this->getObjectDirectory() . '/' . $filename); |
31 | 31 | } catch (IOExceptionInterface $exception) { |
32 | - echo "An error occurred while creating your directory at ".$exception->getPath(); |
|
32 | + echo "An error occurred while creating your directory at " . $exception->getPath(); |
|
33 | 33 | } |
34 | 34 | } |
35 | 35 | |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | |
46 | 46 | public function setObjectSubDirectory(string $uploadDirectory): self |
47 | 47 | { |
48 | - $this->uploadDirectory = $this->targetDirectory .'/' . $uploadDirectory; |
|
48 | + $this->uploadDirectory = $this->targetDirectory . '/' . $uploadDirectory; |
|
49 | 49 | return $this; |
50 | 50 | } |
51 | 51 | |
@@ -53,11 +53,11 @@ discard block |
||
53 | 53 | * @param UploadedFile $file |
54 | 54 | * @return File|null |
55 | 55 | */ |
56 | - public function upload(UploadedFile $file):?File |
|
56 | + public function upload(UploadedFile $file): ?File |
|
57 | 57 | { |
58 | 58 | $originalFilename = pathinfo($file->getClientOriginalName(), PATHINFO_FILENAME); |
59 | 59 | $safeFilename = $this->slugger->slug($originalFilename); |
60 | - $fileName = $safeFilename.'-'.uniqid().'.'.$file->guessExtension(); |
|
60 | + $fileName = $safeFilename . '-' . uniqid() . '.' . $file->guessExtension(); |
|
61 | 61 | |
62 | 62 | try { |
63 | 63 | $newFile = $file->move($this->getObjectDirectory(), $fileName); |
@@ -32,8 +32,8 @@ discard block |
||
32 | 32 | $this->ruleHelper = $ruleHelper; |
33 | 33 | $this->publicDirectory = $kernetProjectDir; |
34 | 34 | $this->cacheDirectory = $cacheDirectory; |
35 | - $this->ruleCacheDirectory = $this->cacheDirectory . self::RULE_PATH ; |
|
36 | - $this->teamCacheDirectory = $this->cacheDirectory . self::TEAM_PATH ; |
|
35 | + $this->ruleCacheDirectory = $this->cacheDirectory . self::RULE_PATH; |
|
36 | + $this->teamCacheDirectory = $this->cacheDirectory . self::TEAM_PATH; |
|
37 | 37 | $this->filesystem = new Filesystem(); |
38 | 38 | $this->fileTeamUploader = $fileTeamUploader; |
39 | 39 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | if (!$this->filesystem->exists($path)) { |
108 | 108 | $img = $this->imageManager->make($file); |
109 | 109 | $this->filesystem->mkdir($newCacheDirectory); |
110 | - $img->resize($width, $height, function ($constraint) { |
|
110 | + $img->resize($width, $height, function($constraint) { |
|
111 | 111 | $constraint->aspectRatio(); |
112 | 112 | }); |
113 | 113 | $img->save($path); |