@@ -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 | } |
@@ -263,7 +263,7 @@ |
||
| 263 | 263 | return (isset($this->injuryTable[$value])) ? array( |
| 264 | 264 | 'key_name' => $this->injuryTable[$value], |
| 265 | 265 | 'effect' => $this->getInjuryEffect($this->injuryTable[$value]) |
| 266 | - ) : false ; |
|
| 266 | + ) : false; |
|
| 267 | 267 | } |
| 268 | 268 | |
| 269 | 269 | /** |
@@ -189,7 +189,7 @@ |
||
| 189 | 189 | foreach ($newPlayerList as $player) { |
| 190 | 190 | $usedNumbers[$player->getNumber()] = $player; |
| 191 | 191 | } |
| 192 | - for ($i=1; $i<=16; $i++) { |
|
| 192 | + for ($i = 1; $i <= 16; $i++) { |
|
| 193 | 193 | if (!isset($usedNumbers[$i])) { |
| 194 | 194 | $newPlayerList->add((new Player())->setNumber($i)); |
| 195 | 195 | } |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | foreach ($value->getPlayers() as $player) { |
| 29 | 29 | $usedNumbers[$player->getNumber()] = $player; |
| 30 | 30 | } |
| 31 | - for ($i=1; $i<=16; $i++) { |
|
| 31 | + for ($i = 1; $i <= 16; $i++) { |
|
| 32 | 32 | if (!isset($usedNumbers[$i])) { |
| 33 | 33 | $value->addPlayer((new Player())->setNumber($i)); |
| 34 | 34 | } |
@@ -189,7 +189,7 @@ |
||
| 189 | 189 | foreach ($newPlayerList as $player) { |
| 190 | 190 | $usedNumbers[$player->getNumber()] = $player; |
| 191 | 191 | } |
| 192 | - for ($i=1; $i<=16; $i++) { |
|
| 192 | + for ($i = 1; $i <= 16; $i++) { |
|
| 193 | 193 | if (!isset($usedNumbers[$i])) { |
| 194 | 194 | $newPlayerList->add((new Player())->setNumber($i)); |
| 195 | 195 | } |
@@ -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); |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | return null; |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | - public function uploadLogoIfExists(Team $object, $logoFile):?File |
|
| 32 | + public function uploadLogoIfExists(Team $object, $logoFile): ?File |
|
| 33 | 33 | { |
| 34 | 34 | if ($logoFile) { |
| 35 | 35 | $this->setObjectSubDirectory($object->getId()); |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | } |
| 45 | 45 | return null; |
| 46 | 46 | } |
| 47 | - public function uploadCoverIfExists(Team $object, $coverFile):?File |
|
| 47 | + public function uploadCoverIfExists(Team $object, $coverFile): ?File |
|
| 48 | 48 | { |
| 49 | 49 | if ($coverFile) { |
| 50 | 50 | $this->setObjectSubDirectory($object->getId()); |
@@ -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); |
@@ -87,7 +87,7 @@ |
||
| 87 | 87 | $pdf->setOption('disable-javascript', true); |
| 88 | 88 | $pdf->setOption('title', $team->getName()); |
| 89 | 89 | |
| 90 | - $fileName = urlencode($team->getName()) . '.pdf'; |
|
| 90 | + $fileName = urlencode($team->getName()) . '.pdf'; |
|
| 91 | 91 | |
| 92 | 92 | return new PdfResponse($pdf->getOutputFromHtml($html), $fileName, null, ResponseHeaderBag::DISPOSITION_INLINE); |
| 93 | 93 | } |