@@ -21,7 +21,7 @@ |
||
21 | 21 | $this->em->flush(); |
22 | 22 | |
23 | 23 | |
24 | - $this->addFlashMessage(FlashMessageCategory::SUCCESS, 'image ' . $image->getTitle() . ' deleted'); |
|
24 | + $this->addFlashMessage(FlashMessageCategory::SUCCESS, 'image '.$image->getTitle().' deleted'); |
|
25 | 25 | |
26 | 26 | } |
27 | 27 |
@@ -23,7 +23,7 @@ |
||
23 | 23 | $this->em->persist($trick); |
24 | 24 | $this->em->flush(); |
25 | 25 | |
26 | - $this->addFlashMessage(FlashMessageCategory::SUCCESS, 'Video '. $video->getTitle() .' Added'); |
|
26 | + $this->addFlashMessage(FlashMessageCategory::SUCCESS, 'Video '.$video->getTitle().' Added'); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |
@@ -23,7 +23,7 @@ |
||
23 | 23 | $this->em->persist($trick); |
24 | 24 | $this->em->flush(); |
25 | 25 | |
26 | - $this->addFlashMessage(FlashMessageCategory::SUCCESS, 'Video '. $video->getTitle() .' deleted'); |
|
26 | + $this->addFlashMessage(FlashMessageCategory::SUCCESS, 'Video '.$video->getTitle().' deleted'); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |
@@ -110,7 +110,7 @@ |
||
110 | 110 | ); |
111 | 111 | |
112 | 112 | if ($mailSent) { |
113 | - $this->addFlashMessage(FlashMessageCategory::SUCCESS, "A validation mail has been sent to " . $user->getEmail()); |
|
113 | + $this->addFlashMessage(FlashMessageCategory::SUCCESS, "A validation mail has been sent to ".$user->getEmail()); |
|
114 | 114 | return; |
115 | 115 | } |
116 | 116 |
@@ -16,7 +16,7 @@ |
||
16 | 16 | { |
17 | 17 | $trick = $event->getEntity(); |
18 | 18 | $this->deleteFromDatabase($event); |
19 | - $this->addFlashMessage(FlashMessageCategory::SUCCESS, 'Trick ' . $trick->getName() . ' Deleted'); |
|
19 | + $this->addFlashMessage(FlashMessageCategory::SUCCESS, 'Trick '.$trick->getName().' Deleted'); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
@@ -16,9 +16,9 @@ discard block |
||
16 | 16 | * Setting the first image as primary as specified in the wireframes |
17 | 17 | * @param AbstractTrickEvent $event |
18 | 18 | */ |
19 | - public function setFirstImageAsPrimary(AbstractTrickEvent $event){ |
|
19 | + public function setFirstImageAsPrimary(AbstractTrickEvent $event) { |
|
20 | 20 | $trick = $event->getEntity(); |
21 | - if($trick->getImages()->count() >0){ |
|
21 | + if ($trick->getImages()->count() > 0) { |
|
22 | 22 | /** @var Image $primImage */ |
23 | 23 | $primImage = $trick->getImages()->first(); |
24 | 24 | $primImage->setPrimaryImage(true); |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | { |
36 | 36 | $trick = $event->getEntity(); |
37 | 37 | $this->sendToDatabase($event); |
38 | - $this->addFlashMessage(FlashMessageCategory::SUCCESS, 'Trick ' . $trick->getName() . ' saved'); |
|
38 | + $this->addFlashMessage(FlashMessageCategory::SUCCESS, 'Trick '.$trick->getName().' saved'); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
@@ -30,7 +30,7 @@ |
||
30 | 30 | if ($event->getException() instanceof RedirectException) { |
31 | 31 | $redirectResponse = new RedirectResponse($event->getException()->getRedirectResponse()); |
32 | 32 | |
33 | - if($event->getException()->getMessage() !== ""){ |
|
33 | + if ($event->getException()->getMessage() !== "") { |
|
34 | 34 | $this->addFlashMessage(FlashMessageCategory::ERROR, $event->getException()->getMessage()); |
35 | 35 | } |
36 | 36 |
@@ -26,12 +26,12 @@ discard block |
||
26 | 26 | public function buildForm(FormBuilderInterface $builder, array $options) |
27 | 27 | { |
28 | 28 | |
29 | - if($options['all_tags_json'] === '' || $options['trick_tags_json'] === ''){ |
|
29 | + if ($options['all_tags_json'] === '' || $options['trick_tags_json'] === '') { |
|
30 | 30 | throw new UnexpectedValueException("all_tags_json or trick_tags_json not defined in the form constructor"); |
31 | 31 | } |
32 | 32 | |
33 | 33 | $builder |
34 | - ->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
34 | + ->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
35 | 35 | $trick = $event->getData(); |
36 | 36 | |
37 | 37 | $form = $event->getForm(); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | 'class' => 'waves-effect waves-light btn red lighten-2 right mr-2', |
44 | 44 | 'onclick' => 'return confirm(\'are you sure?\')', |
45 | 45 | ] |
46 | - ]);; |
|
46 | + ]); ; |
|
47 | 47 | } |
48 | 48 | }) |
49 | 49 | ->add('name', TextType::class, [ |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | use Symfony\Component\OptionsResolver\OptionsResolver; |
10 | 10 | use Symfony\Component\PropertyAccess\PropertyAccess; |
11 | 11 | |
12 | -class ShowImageType extends AbstractType{ |
|
12 | +class ShowImageType extends AbstractType { |
|
13 | 13 | |
14 | 14 | public function configureOptions(OptionsResolver $resolver) |
15 | 15 | { |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | public function buildView(FormView $view, FormInterface $form, array $options) |
21 | 21 | { |
22 | 22 | |
23 | - if(isset($options['image_property'])){ |
|
23 | + if (isset($options['image_property'])) { |
|
24 | 24 | |
25 | 25 | // this will be whatever class/entity is bound to your form (e.g. Media) |
26 | 26 | $parentData = $form->getParent()->getData(); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | } |
40 | 40 | } |
41 | 41 | |
42 | - public function getParent(){ |
|
42 | + public function getParent() { |
|
43 | 43 | return TextType::class; |
44 | 44 | } |
45 | 45 | } |
46 | 46 | \ No newline at end of file |