@@ -29,9 +29,9 @@ discard block |
||
29 | 29 | |
30 | 30 | if ($violations->count() > 0) { |
31 | 31 | /** @var ConstraintViolation $violation */ |
32 | - $violation = $violations[0]; |
|
32 | + $violation = $violations[ 0 ]; |
|
33 | 33 | |
34 | - return new JsonResponse(['status' => 'error', 'message' => $violation->getMessage()]); |
|
34 | + return new JsonResponse([ 'status' => 'error', 'message' => $violation->getMessage() ]); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | $fileName = $fileUploader->upload($uploadedFile); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $em->persist($photo); |
50 | 50 | $em->flush(); |
51 | 51 | |
52 | - return new JsonResponse(['status' => 'ok']); |
|
52 | + return new JsonResponse([ 'status' => 'ok' ]); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | /** |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $repository = $this->getDoctrine()->getRepository(Photo::class); |
81 | 81 | $repository->reorderPhotos($ids); |
82 | 82 | |
83 | - return new JsonResponse(['status' => 'ok']); |
|
83 | + return new JsonResponse([ 'status' => 'ok' ]); |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | /** |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | if (!$this->isCsrfTokenValid('delete', $request->request->get('token'))) { |
95 | 95 | return $this->redirectToRoute( |
96 | 96 | 'admin_photo_edit', |
97 | - ['id' => $request->attributes->get('property_id')] |
|
97 | + [ 'id' => $request->attributes->get('property_id') ] |
|
98 | 98 | ); |
99 | 99 | } |
100 | 100 | |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | |
111 | 111 | return $this->redirectToRoute( |
112 | 112 | 'admin_photo_edit', |
113 | - ['id' => $request->attributes->get('property_id')] |
|
113 | + [ 'id' => $request->attributes->get('property_id') ] |
|
114 | 114 | ); |
115 | 115 | } |
116 | 116 | } |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | public function addProperty(Property $property): self |
88 | 88 | { |
89 | 89 | if (!$this->properties->contains($property)) { |
90 | - $this->properties[] = $property; |
|
90 | + $this->properties[ ] = $property; |
|
91 | 91 | $property->setLocality($this); |
92 | 92 | } |
93 | 93 | |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | public function addArea(Area $area): self |
119 | 119 | { |
120 | 120 | if (!$this->areas->contains($area)) { |
121 | - $this->areas[] = $area; |
|
121 | + $this->areas[ ] = $area; |
|
122 | 122 | $area->setLocality($this); |
123 | 123 | } |
124 | 124 |
@@ -80,7 +80,7 @@ |
||
80 | 80 | public function addProperty(Property $property): self |
81 | 81 | { |
82 | 82 | if (!$this->properties->contains($property)) { |
83 | - $this->properties[] = $property; |
|
83 | + $this->properties[ ] = $property; |
|
84 | 84 | $property->setLocality($this); |
85 | 85 | } |
86 | 86 |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | $eventDispatcher->dispatch(new ContactFormSubmittedEvent($contact)); |
32 | 32 | $this->addFlash('success', 'message.was_sent'); |
33 | 33 | |
34 | - return $this->redirectToRoute('page', ['slug' => $page->getSlug()]); |
|
34 | + return $this->redirectToRoute('page', [ 'slug' => $page->getSlug() ]); |
|
35 | 35 | } |
36 | 36 | } |
37 | 37 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | [ |
40 | 40 | 'site' => $this->site(), |
41 | 41 | 'page' => $page, |
42 | - 'form' => (!empty($form) ? $form->createView() : []), |
|
42 | + 'form' => (!empty($form) ? $form->createView() : [ ]), |
|
43 | 43 | ] |
44 | 44 | ); |
45 | 45 | } |
@@ -92,7 +92,7 @@ |
||
92 | 92 | $items = $request->request->get('items'); |
93 | 93 | $repository->reorderItems($items); |
94 | 94 | |
95 | - return new JsonResponse(['status' => 'ok']); |
|
95 | + return new JsonResponse([ 'status' => 'ok' ]); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |
@@ -54,7 +54,7 @@ |
||
54 | 54 | $this->propertyService->create($property, $user); |
55 | 55 | $this->addFlash('success', 'message.created'); |
56 | 56 | |
57 | - return $this->redirectToRoute('admin_photo_edit', ['id' => $property->getId()]); |
|
57 | + return $this->redirectToRoute('admin_photo_edit', [ 'id' => $property->getId() ]); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | return $this->render('admin/property/new.html.twig', [ |
@@ -20,7 +20,7 @@ |
||
20 | 20 | */ |
21 | 21 | public function edit(Request $request, SettingRepository $repository): Response |
22 | 22 | { |
23 | - $settings = $repository->findAll()[0]; |
|
23 | + $settings = $repository->findAll()[ 0 ]; |
|
24 | 24 | |
25 | 25 | $form = $this->createForm(SettingType::class, $settings); |
26 | 26 | $form->handleRequest($request); |
@@ -22,9 +22,9 @@ |
||
22 | 22 | { |
23 | 23 | // Create a message |
24 | 24 | $message = (new Swift_Message($subject)) |
25 | - ->setFrom([$fromEmail => $fromName]) |
|
26 | - ->setTo([$toEmail]) |
|
27 | - ->setReplyTo([$fromEmail]) |
|
25 | + ->setFrom([ $fromEmail => $fromName ]) |
|
26 | + ->setTo([ $toEmail ]) |
|
27 | + ->setReplyTo([ $fromEmail ]) |
|
28 | 28 | ->setBody($body); |
29 | 29 | |
30 | 30 | // Send the message |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | { |
13 | 13 | public function load(ObjectManager $manager): void |
14 | 14 | { |
15 | - foreach ($this->getCurrencyData() as [$currencyTitle, $code, $symbolLeft, $symbolRight]) { |
|
15 | + foreach ($this->getCurrencyData() as [ $currencyTitle, $code, $symbolLeft, $symbolRight ]) { |
|
16 | 16 | $category = new Currency(); |
17 | 17 | $category->setCurrencyTitle($currencyTitle); |
18 | 18 | $category->setCode($code); |
@@ -29,12 +29,12 @@ discard block |
||
29 | 29 | { |
30 | 30 | return [ |
31 | 31 | // $currencyData = [$currencyTitle, $code, $symbolLeft, $symbolRight]; |
32 | - ['US Dollar', 'USD', '$', ''], |
|
33 | - ['Euro', 'EUR', '', '€'], |
|
34 | - ['Pound Sterling', 'GBP', '£', ''], |
|
35 | - ['Hong Kong Dollar', 'HKD', 'HK$', ''], |
|
36 | - ['Russian Ruble', 'RUB', '₽', ''], |
|
37 | - ['Belarusian ruble', 'BYN', '', 'Br'], |
|
32 | + [ 'US Dollar', 'USD', '$', '' ], |
|
33 | + [ 'Euro', 'EUR', '', '€' ], |
|
34 | + [ 'Pound Sterling', 'GBP', '£', '' ], |
|
35 | + [ 'Hong Kong Dollar', 'HKD', 'HK$', '' ], |
|
36 | + [ 'Russian Ruble', 'RUB', '₽', '' ], |
|
37 | + [ 'Belarusian ruble', 'BYN', '', 'Br' ], |
|
38 | 38 | ]; |
39 | 39 | } |
40 | 40 | } |