@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | { |
| 13 | 13 | public function load(ObjectManager $manager): void |
| 14 | 14 | { |
| 15 | - foreach ($this->getPhotoData() as [$property, $priority, $file]) { |
|
| 15 | + foreach ($this->getPhotoData() as [ $property, $priority, $file ]) { |
|
| 16 | 16 | $photo = new Photo(); |
| 17 | 17 | $photo->setProperty($property); |
| 18 | 18 | $photo->setSortOrder($priority); |
@@ -26,22 +26,22 @@ discard block |
||
| 26 | 26 | { |
| 27 | 27 | return [ |
| 28 | 28 | // $photoData = [$property, $priority, $file]; |
| 29 | - [$this->getReference('bright-and-cheerful-alcove-studio'), 1, 'demo/1.jpeg'], |
|
| 30 | - [$this->getReference('bright-and-cheerful-alcove-studio'), 2, 'demo/2.jpeg'], |
|
| 31 | - [$this->getReference('modern-one-bedroom-apartment-in-miami'), 1, 'demo/3.jpeg'], |
|
| 32 | - [$this->getReference('modern-one-bedroom-apartment-in-miami'), 2, 'demo/4.jpeg'], |
|
| 33 | - [$this->getReference('stylish-two-level-penthouse-in-palm-beach'), 1, 'demo/5.jpeg'], |
|
| 34 | - [$this->getReference('stylish-two-level-penthouse-in-palm-beach'), 2, 'demo/6.jpeg'], |
|
| 35 | - [$this->getReference('bright-fully-furnished-1-bedroom-flat-on-the-2nd-floor'), 1, 'demo/7.jpeg'], |
|
| 36 | - [$this->getReference('bright-fully-furnished-1-bedroom-flat-on-the-2nd-floor'), 2, 'demo/2.jpeg'], |
|
| 37 | - [$this->getReference('beautiful-villa-for-sale-in-tampa'), 1, 'demo/8.jpeg'], |
|
| 38 | - [$this->getReference('beautiful-villa-for-sale-in-tampa'), 2, 'demo/9.jpeg'], |
|
| 39 | - [$this->getReference('beautiful-villa-for-sale-in-tampa'), 3, 'demo/4.jpeg'], |
|
| 40 | - [$this->getReference('furnished-renovated-2-bedroom-2-bathroom-flat'), 1, 'demo/10.jpeg'], |
|
| 41 | - [$this->getReference('furnished-renovated-2-bedroom-2-bathroom-flat'), 2, 'demo/6.jpeg'], |
|
| 42 | - [$this->getReference('interesting-two-bedroom-apartment-for-sale'), 1, 'demo/11.jpeg'], |
|
| 43 | - [$this->getReference('interesting-two-bedroom-apartment-for-sale'), 2, 'demo/12.jpeg'], |
|
| 44 | - [$this->getReference('interesting-two-bedroom-apartment-for-sale'), 3, 'demo/13.jpeg'], |
|
| 29 | + [ $this->getReference('bright-and-cheerful-alcove-studio'), 1, 'demo/1.jpeg' ], |
|
| 30 | + [ $this->getReference('bright-and-cheerful-alcove-studio'), 2, 'demo/2.jpeg' ], |
|
| 31 | + [ $this->getReference('modern-one-bedroom-apartment-in-miami'), 1, 'demo/3.jpeg' ], |
|
| 32 | + [ $this->getReference('modern-one-bedroom-apartment-in-miami'), 2, 'demo/4.jpeg' ], |
|
| 33 | + [ $this->getReference('stylish-two-level-penthouse-in-palm-beach'), 1, 'demo/5.jpeg' ], |
|
| 34 | + [ $this->getReference('stylish-two-level-penthouse-in-palm-beach'), 2, 'demo/6.jpeg' ], |
|
| 35 | + [ $this->getReference('bright-fully-furnished-1-bedroom-flat-on-the-2nd-floor'), 1, 'demo/7.jpeg' ], |
|
| 36 | + [ $this->getReference('bright-fully-furnished-1-bedroom-flat-on-the-2nd-floor'), 2, 'demo/2.jpeg' ], |
|
| 37 | + [ $this->getReference('beautiful-villa-for-sale-in-tampa'), 1, 'demo/8.jpeg' ], |
|
| 38 | + [ $this->getReference('beautiful-villa-for-sale-in-tampa'), 2, 'demo/9.jpeg' ], |
|
| 39 | + [ $this->getReference('beautiful-villa-for-sale-in-tampa'), 3, 'demo/4.jpeg' ], |
|
| 40 | + [ $this->getReference('furnished-renovated-2-bedroom-2-bathroom-flat'), 1, 'demo/10.jpeg' ], |
|
| 41 | + [ $this->getReference('furnished-renovated-2-bedroom-2-bathroom-flat'), 2, 'demo/6.jpeg' ], |
|
| 42 | + [ $this->getReference('interesting-two-bedroom-apartment-for-sale'), 1, 'demo/11.jpeg' ], |
|
| 43 | + [ $this->getReference('interesting-two-bedroom-apartment-for-sale'), 2, 'demo/12.jpeg' ], |
|
| 44 | + [ $this->getReference('interesting-two-bedroom-apartment-for-sale'), 3, 'demo/13.jpeg' ], |
|
| 45 | 45 | ]; |
| 46 | 46 | } |
| 47 | 47 | } |
@@ -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 | } |