@@ -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 | } |
@@ -33,11 +33,10 @@ |
||
33 | 33 | } |
34 | 34 | |
35 | 35 | $uploadDirectory = (!isset($config['obblm.upload_directory'])) ? |
36 | - $uploadDirectory = $container->getParameter('kernel.project_dir') . '/public/uploads/obblm' : |
|
37 | - $config['obblm.upload_directory']; |
|
36 | + $uploadDirectory = $container->getParameter('kernel.project_dir') . '/public/uploads/obblm' : $config['obblm.upload_directory']; |
|
38 | 37 | $container->setParameter('obblm.config.upload_directory', $uploadDirectory); |
39 | 38 | |
40 | - $locator = new FileLocator(dirname(__DIR__).'/Resources/config'); |
|
39 | + $locator = new FileLocator(dirname(__DIR__) . '/Resources/config'); |
|
41 | 40 | $loader = new YamlFileLoader($container, $locator); |
42 | 41 | $loader->load('services.yaml'); |
43 | 42 |
@@ -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()); |