@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | */ |
110 | 110 | public function getUsername(): string |
111 | 111 | { |
112 | - return (string)$this->userName; |
|
112 | + return (string) $this->userName; |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | /** |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | */ |
137 | 137 | public function getPassword(): string |
138 | 138 | { |
139 | - return (string)$this->password; |
|
139 | + return (string) $this->password; |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | public function setPassword(string $password): self |
@@ -328,6 +328,6 @@ discard block |
||
328 | 328 | $this->verified, |
329 | 329 | $this->verifiedDateTime, |
330 | 330 | $this->updatedAt, |
331 | - )=unserialize($serialized, ['allowed_classes' => false]); |
|
331 | + ) = unserialize($serialized, ['allowed_classes' => false]); |
|
332 | 332 | } |
333 | 333 | } |
@@ -9,13 +9,13 @@ |
||
9 | 9 | use Symfony\Component\OptionsResolver\OptionsResolver; |
10 | 10 | use Vich\UploaderBundle\Form\Type\VichImageType; |
11 | 11 | |
12 | -class UserProfileFormType extends AbstractType{ |
|
12 | +class UserProfileFormType extends AbstractType { |
|
13 | 13 | |
14 | 14 | public function buildForm(FormBuilderInterface $builder, array $options) |
15 | 15 | { |
16 | 16 | $builder |
17 | 17 | ->add('UserName', TextType::class) |
18 | - ->add('imageFile', VichImageType::class,[ |
|
18 | + ->add('imageFile', VichImageType::class, [ |
|
19 | 19 | 'required' => false, |
20 | 20 | 'allow_delete' => false, |
21 | 21 | 'download_uri' => false, |
@@ -11,7 +11,7 @@ |
||
11 | 11 | use Symfony\Component\Validator\Constraints\Length; |
12 | 12 | use Symfony\Component\Validator\Constraints\NotBlank; |
13 | 13 | |
14 | -class UserChangePasswordFormType extends AbstractType{ |
|
14 | +class UserChangePasswordFormType extends AbstractType { |
|
15 | 15 | |
16 | 16 | public function buildForm(FormBuilderInterface $builder, array $options) |
17 | 17 | { |
@@ -43,13 +43,13 @@ |
||
43 | 43 | public function revertHistory(Trick $trick, int $historyId, Request $request) |
44 | 44 | { |
45 | 45 | $submittedToken = $request->request->get('_token'); |
46 | - if (!$this->isCsrfTokenValid('revert-trick' . $historyId, $submittedToken)) { |
|
46 | + if (!$this->isCsrfTokenValid('revert-trick'.$historyId, $submittedToken)) { |
|
47 | 47 | throw new RedirectException($this->generateUrl('home'), 'Bad CSRF Token'); |
48 | 48 | } |
49 | 49 | $version = $request->request->get('_version'); |
50 | 50 | $this->trickHistory->revertToHistory($trick->getId(), $version); |
51 | 51 | |
52 | - $this->addFlash(FlashMessageCategory::SUCCESS, 'Reverted ' . $trick->getName()); |
|
52 | + $this->addFlash(FlashMessageCategory::SUCCESS, 'Reverted '.$trick->getName()); |
|
53 | 53 | return $this->redirectToRoute('trick.show', [ |
54 | 54 | 'id' => $trick->getId(), |
55 | 55 | 'slug' => $trick->getSlug(), |
@@ -38,7 +38,7 @@ |
||
38 | 38 | * @param $version |
39 | 39 | * Revert a trick to a history checkpoint. |
40 | 40 | */ |
41 | - public function revertToHistory($id, $version){ |
|
41 | + public function revertToHistory($id, $version) { |
|
42 | 42 | $trick = $this->em->find('App\Entity\Trick', $id); |
43 | 43 | $this->repo->revert($trick, $version); |
44 | 44 | $this->em->persist($trick); |
@@ -18,7 +18,7 @@ |
||
18 | 18 | /** @var Trick $trick */ |
19 | 19 | $trick = $event->getEntity(); |
20 | 20 | $this->sendToDatabase($event); |
21 | - $this->addFlash(FlashMessageCategory::SUCCESS, 'Trick ' . $trick->getName() . ' updated'); |
|
21 | + $this->addFlash(FlashMessageCategory::SUCCESS, 'Trick '.$trick->getName().' updated'); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | /** |
@@ -18,7 +18,7 @@ |
||
18 | 18 | /** @var Trick $trick */ |
19 | 19 | $trick = $event->getEntity(); |
20 | 20 | $this->sendToDatabase($event); |
21 | - $this->addFlash(FlashMessageCategory::SUCCESS, 'Trick ' . $trick->getName() . ' created'); |
|
21 | + $this->addFlash(FlashMessageCategory::SUCCESS, 'Trick '.$trick->getName().' created'); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | /** |
@@ -18,7 +18,7 @@ |
||
18 | 18 | /** @var Trick $trick */ |
19 | 19 | $trick = $event->getEntity(); |
20 | 20 | $this->deleteFromDatabase($event); |
21 | - $this->addFlash(FlashMessageCategory::SUCCESS, 'Trick ' . $trick->getName() . ' Deleted'); |
|
21 | + $this->addFlash(FlashMessageCategory::SUCCESS, 'Trick '.$trick->getName().' Deleted'); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | /** |
@@ -64,7 +64,7 @@ |
||
64 | 64 | |
65 | 65 | //Adding extra users |
66 | 66 | |
67 | - for($i=0; $i<10; $i++){ |
|
67 | + for ($i = 0; $i < 10; $i++) { |
|
68 | 68 | $user = new User(); |
69 | 69 | $user->setEmail('user'.$i.'@localhost.com') |
70 | 70 | ->setUserName('user'.$i) |