Completed
Branch master (b75fea)
by Valery
09:42
created
src/Utils/Slugger.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,14 +32,14 @@
 block discarded – undo
32 32
      */
33 33
     private static function transliteration($str)
34 34
     {
35
-        $a = ['зг', 'Зг', 'А', 'а', 'Б', 'б', 'В', 'в', 'Г', 'г', 'Ґ', 'ґ', 'Д', 'д', 'Е',
35
+        $a = [ 'зг', 'Зг', 'А', 'а', 'Б', 'б', 'В', 'в', 'Г', 'г', 'Ґ', 'ґ', 'Д', 'д', 'Е',
36 36
             'е', 'Ё', 'ё', 'Є', 'є', 'Ж', 'ж', 'З', 'з', 'И', 'и', 'І', 'і', 'Ї', 'ї', 'Й', 'й', 'К', 'к',
37 37
             'Л', 'л', 'М', 'м', 'Н', 'н', 'О', 'о', 'П', 'п', 'Р', 'р', 'С', 'с', 'Т', 'т', 'У', 'у', 'Ф',
38 38
             'ф', 'Х', 'х', 'Ц', 'ц', 'Ч', 'ч', 'Ш', 'ш', 'Щ', 'щ', 'Ы', 'ы', 'Э', 'э', 'Ю', 'ю', 'Я', 'я',
39 39
             'Ь', 'ь', 'Ъ', 'ъ',
40 40
         ];
41 41
 
42
-        $b = ['zgh', 'Zgh', 'A', 'a', 'B', 'b', 'V', 'v', 'G', 'g', 'G', 'g', 'D', 'd', 'E',
42
+        $b = [ 'zgh', 'Zgh', 'A', 'a', 'B', 'b', 'V', 'v', 'G', 'g', 'G', 'g', 'D', 'd', 'E',
43 43
             'e', 'E', 'e', 'Ye', 'ie', 'Zh', 'zh', 'Z', 'z', 'I', 'i', 'I', 'i', 'Yi', 'i', 'Y', 'y', 'K', 'k',
44 44
             'L', 'l', 'M', 'm', 'N', 'n', 'O', 'o', 'P', 'p', 'R', 'r', 'S', 's', 'T', 't', 'U', 'u', 'F', 'f', 'Kh', 'kh',
45 45
             'Ts', 'ts', 'Ch', 'ch', 'Sh', 'sh', 'Shch', 'shch', 'Y', 'y', 'E', 'e', 'Yu', 'iu', 'Ya', 'ya',
Please login to merge, or discard this patch.
src/DataFixtures/AppFixtures.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
     private function loadProperties(ObjectManager $manager): void
128 128
     {
129 129
         foreach ($this->getPropertyData() as [$operation_id, $category_id, $locality_id, $title,
130
-                 $address, $latitude, $longitude, $price, $price_type, ]) {
130
+                    $address, $latitude, $longitude, $price, $price_type, ]) {
131 131
             $property = new Property();
132 132
             $property->setAuthor($this->getReference('admin'));
133 133
             $property->setOperation($operation_id);
Please login to merge, or discard this patch.
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
     private function loadLocalities(ObjectManager $manager): void
76 76
     {
77
-        foreach ($this->getLocalityData() as [$slug, $name]) {
77
+        foreach ($this->getLocalityData() as [ $slug, $name ]) {
78 78
             $locality = new Locality();
79 79
             $locality->setName($name);
80 80
             $locality->setSlug($slug);
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
     private function loadCategories(ObjectManager $manager): void
88 88
     {
89
-        foreach ($this->getCategoryData() as [$slug, $name]) {
89
+        foreach ($this->getCategoryData() as [ $slug, $name ]) {
90 90
             $category = new Category();
91 91
             $category->setName($name);
92 92
             $category->setSlug($slug);
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
     private function loadOperations(ObjectManager $manager): void
100 100
     {
101
-        foreach ($this->getOperationData() as [$slug, $name]) {
101
+        foreach ($this->getOperationData() as [ $slug, $name ]) {
102 102
             $operation = new Operation();
103 103
             $operation->setName($name);
104 104
             $operation->setSlug($slug);
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         ));
119 119
         $user->setPhone('0(0)99766899');
120 120
         $user->setEmail('admin@admin');
121
-        $user->setRoles(['ROLE_ADMIN']);
121
+        $user->setRoles([ 'ROLE_ADMIN' ]);
122 122
         $manager->persist($user);
123 123
         $this->addReference('admin', $user);
124 124
         $manager->flush();
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 
127 127
     private function loadProperties(ObjectManager $manager): void
128 128
     {
129
-        foreach ($this->getPropertyData() as [$operation_id, $category_id, $locality_id, $title,
129
+        foreach ($this->getPropertyData() as [ $operation_id, $category_id, $locality_id, $title,
130 130
                  $address, $latitude, $longitude, $price, $price_type, ]) {
131 131
             $property = new Property();
132 132
             $property->setAuthor($this->getReference('admin'));
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 
154 154
     private function loadPhotos(ObjectManager $manager): void
155 155
     {
156
-        foreach ($this->getPhotoData() as [$property, $priority, $file]) {
156
+        foreach ($this->getPhotoData() as [ $property, $priority, $file ]) {
157 157
             $photo = new Photo();
158 158
             $photo->setProperty($property);
159 159
             $photo->setPriority($priority);
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 
166 166
     private function loadMenu(ObjectManager $manager): void
167 167
     {
168
-        foreach ($this->getMenuData() as [$title, $url]) {
168
+        foreach ($this->getMenuData() as [ $title, $url ]) {
169 169
             $menu = new Menu();
170 170
             $menu->setTitle($title);
171 171
             $menu->setUrl($url);
@@ -179,10 +179,10 @@  discard block
 block discarded – undo
179 179
     {
180 180
         return [
181 181
             // $categoryData = [$slug, $name];
182
-            ['apartment', 'Apartment'],
183
-            ['duplex', 'Duplex'],
184
-            ['penthouse', 'Penthouse'],
185
-            ['villa', 'Villa'],
182
+            [ 'apartment', 'Apartment' ],
183
+            [ 'duplex', 'Duplex' ],
184
+            [ 'penthouse', 'Penthouse' ],
185
+            [ 'villa', 'Villa' ],
186 186
         ];
187 187
     }
188 188
 
@@ -190,8 +190,8 @@  discard block
 block discarded – undo
190 190
     {
191 191
         return [
192 192
             // $operationData = [$slug, $name];
193
-            ['rent', 'Rent'],
194
-            ['sale', 'Sale'],
193
+            [ 'rent', 'Rent' ],
194
+            [ 'sale', 'Sale' ],
195 195
         ];
196 196
     }
197 197
 
@@ -199,9 +199,9 @@  discard block
 block discarded – undo
199 199
     {
200 200
         return [
201 201
             // $localityData = [$slug, $name];
202
-            ['miami', 'Miami'],
203
-            ['palm-beach', 'Palm Beach'],
204
-            ['tampa', 'Tampa'],
202
+            [ 'miami', 'Miami' ],
203
+            [ 'palm-beach', 'Palm Beach' ],
204
+            [ 'tampa', 'Tampa' ],
205 205
         ];
206 206
     }
207 207
 
@@ -209,22 +209,22 @@  discard block
 block discarded – undo
209 209
     {
210 210
         return [
211 211
             // $photoData = [$property, $priority, $file];
212
-            [$this->getReference('bright-and-cheerful-alcove-studio'), 2, 'demo/1.jpeg'],
213
-            [$this->getReference('bright-and-cheerful-alcove-studio'), 1, 'demo/2.jpeg'],
214
-            [$this->getReference('modern-one-bedroom-apartment-in-miami'), 2, 'demo/3.jpeg'],
215
-            [$this->getReference('modern-one-bedroom-apartment-in-miami'), 1, 'demo/4.jpeg'],
216
-            [$this->getReference('stylish-two-level-penthouse-in-palm-beach'), 2, 'demo/5.jpeg'],
217
-            [$this->getReference('stylish-two-level-penthouse-in-palm-beach'), 1, 'demo/6.jpeg'],
218
-            [$this->getReference('bright-fully-furnished-1-bedroom-flat-on-the-2nd-floor'), 2, 'demo/7.jpeg'],
219
-            [$this->getReference('bright-fully-furnished-1-bedroom-flat-on-the-2nd-floor'), 1, 'demo/2.jpeg'],
220
-            [$this->getReference('beautiful-villa-for-sale-in-tampa'), 3, 'demo/8.jpeg'],
221
-            [$this->getReference('beautiful-villa-for-sale-in-tampa'), 2, 'demo/9.jpeg'],
222
-            [$this->getReference('beautiful-villa-for-sale-in-tampa'), 1, 'demo/4.jpeg'],
223
-            [$this->getReference('furnished-renovated-2-bedroom-2-bathroom-flat'), 2, 'demo/10.jpeg'],
224
-            [$this->getReference('furnished-renovated-2-bedroom-2-bathroom-flat'), 1, 'demo/6.jpeg'],
225
-            [$this->getReference('interesting-two-bedroom-apartment-for-sale'), 3, 'demo/11.jpeg'],
226
-            [$this->getReference('interesting-two-bedroom-apartment-for-sale'), 2, 'demo/12.jpeg'],
227
-            [$this->getReference('interesting-two-bedroom-apartment-for-sale'), 1, 'demo/13.jpeg'],
212
+            [ $this->getReference('bright-and-cheerful-alcove-studio'), 2, 'demo/1.jpeg' ],
213
+            [ $this->getReference('bright-and-cheerful-alcove-studio'), 1, 'demo/2.jpeg' ],
214
+            [ $this->getReference('modern-one-bedroom-apartment-in-miami'), 2, 'demo/3.jpeg' ],
215
+            [ $this->getReference('modern-one-bedroom-apartment-in-miami'), 1, 'demo/4.jpeg' ],
216
+            [ $this->getReference('stylish-two-level-penthouse-in-palm-beach'), 2, 'demo/5.jpeg' ],
217
+            [ $this->getReference('stylish-two-level-penthouse-in-palm-beach'), 1, 'demo/6.jpeg' ],
218
+            [ $this->getReference('bright-fully-furnished-1-bedroom-flat-on-the-2nd-floor'), 2, 'demo/7.jpeg' ],
219
+            [ $this->getReference('bright-fully-furnished-1-bedroom-flat-on-the-2nd-floor'), 1, 'demo/2.jpeg' ],
220
+            [ $this->getReference('beautiful-villa-for-sale-in-tampa'), 3, 'demo/8.jpeg' ],
221
+            [ $this->getReference('beautiful-villa-for-sale-in-tampa'), 2, 'demo/9.jpeg' ],
222
+            [ $this->getReference('beautiful-villa-for-sale-in-tampa'), 1, 'demo/4.jpeg' ],
223
+            [ $this->getReference('furnished-renovated-2-bedroom-2-bathroom-flat'), 2, 'demo/10.jpeg' ],
224
+            [ $this->getReference('furnished-renovated-2-bedroom-2-bathroom-flat'), 1, 'demo/6.jpeg' ],
225
+            [ $this->getReference('interesting-two-bedroom-apartment-for-sale'), 3, 'demo/11.jpeg' ],
226
+            [ $this->getReference('interesting-two-bedroom-apartment-for-sale'), 2, 'demo/12.jpeg' ],
227
+            [ $this->getReference('interesting-two-bedroom-apartment-for-sale'), 1, 'demo/13.jpeg' ],
228 228
         ];
229 229
     }
230 230
 
@@ -299,8 +299,8 @@  discard block
 block discarded – undo
299 299
     {
300 300
         return [
301 301
             // $menuData = [$title, $url];
302
-            ['Homepage', '/'],
303
-            ['About Us', '/info/about-us'],
302
+            [ 'Homepage', '/' ],
303
+            [ 'About Us', '/info/about-us' ],
304 304
         ];
305 305
     }
306 306
 
Please login to merge, or discard this patch.
src/Entity/Operation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
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->setOperation($this);
85 85
         }
86 86
 
Please login to merge, or discard this patch.
src/Entity/Locality.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Entity/Property.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -391,7 +391,7 @@
 block discarded – undo
391 391
     public function addPhoto(Photo $photo): self
392 392
     {
393 393
         if (!$this->photos->contains($photo)) {
394
-            $this->photos[] = $photo;
394
+            $this->photos[ ] = $photo;
395 395
             $photo->setProperty($this);
396 396
         }
397 397
 
Please login to merge, or discard this patch.
src/Entity/Category.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
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->setCategory($this);
85 85
         }
86 86
 
Please login to merge, or discard this patch.
src/Entity/User.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      *
65 65
      * @ORM\Column(type="json")
66 66
      */
67
-    private $roles = [];
67
+    private $roles = [ ];
68 68
 
69 69
     /**
70 70
      * @ORM\OneToMany(targetEntity="App\Entity\Property", mappedBy="author")
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         $roles = $this->roles;
140 140
         // guarantees that a user always has at least one role for security
141 141
         if (empty($roles)) {
142
-            $roles[] = 'ROLE_USER';
142
+            $roles[ ] = 'ROLE_USER';
143 143
         }
144 144
 
145 145
         return array_unique($roles);
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
     public function serialize(): string
181 181
     {
182 182
         // add $this->salt too if you don't use Bcrypt or Argon2i
183
-        return serialize([$this->id, $this->username, $this->password]);
183
+        return serialize([ $this->id, $this->username, $this->password ]);
184 184
     }
185 185
 
186 186
     /**
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
     public function unserialize($serialized): void
190 190
     {
191 191
         // add $this->salt too if you don't use Bcrypt or Argon2i
192
-        [$this->id, $this->username, $this->password] = unserialize($serialized, ['allowed_classes' => false]);
192
+        [ $this->id, $this->username, $this->password ] = unserialize($serialized, [ 'allowed_classes' => false ]);
193 193
     }
194 194
 
195 195
     /**
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
     public function addProperty(Property $property): self
204 204
     {
205 205
         if (!$this->properties->contains($property)) {
206
-            $this->properties[] = $property;
206
+            $this->properties[ ] = $property;
207 207
             $property->setAuthor($this);
208 208
         }
209 209
 
Please login to merge, or discard this patch.
src/Repository/UserRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
     {
32 32
         $cache = new FilesystemAdapter();
33 33
 
34
-        $count = $cache->get('users_count', function (ItemInterface $item) {
34
+        $count = $cache->get('users_count', function(ItemInterface $item) {
35 35
             $item->expiresAfter(3600);
36 36
 
37 37
             return $this->countAll();
Please login to merge, or discard this patch.
src/Repository/CategoryRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
     {
38 38
         $cache = new FilesystemAdapter();
39 39
 
40
-        $count = $cache->get('categories_count', function (ItemInterface $item) {
40
+        $count = $cache->get('categories_count', function(ItemInterface $item) {
41 41
             $item->expiresAfter(3600);
42 42
 
43 43
             return $this->countAll();
Please login to merge, or discard this patch.