@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | |
| 119 | 119 | $this->generateVariants($product); |
| 120 | 120 | |
| 121 | - $this->setReference('Sylius.Product.'.$i, $product); |
|
| 121 | + $this->setReference('Sylius.Product.' . $i, $product); |
|
| 122 | 122 | |
| 123 | 123 | return $product; |
| 124 | 124 | } |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | |
| 163 | 163 | $this->generateVariants($product); |
| 164 | 164 | |
| 165 | - $this->setReference('Sylius.Product.'.$i, $product); |
|
| 165 | + $this->setReference('Sylius.Product.' . $i, $product); |
|
| 166 | 166 | |
| 167 | 167 | return $product; |
| 168 | 168 | } |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | |
| 200 | 200 | $this->generateVariants($product); |
| 201 | 201 | |
| 202 | - $this->setReference('Sylius.Product.'.$i, $product); |
|
| 202 | + $this->setReference('Sylius.Product.' . $i, $product); |
|
| 203 | 203 | |
| 204 | 204 | return $product; |
| 205 | 205 | } |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | $this->addAttribute($product, 'book_isbn', $isbn); |
| 237 | 237 | $this->addAttribute($product, 'book_pages', $this->faker->randomNumber(3)); |
| 238 | 238 | |
| 239 | - $this->setReference('Sylius.Product.'.$i, $product); |
|
| 239 | + $this->setReference('Sylius.Product.' . $i, $product); |
|
| 240 | 240 | |
| 241 | 241 | return $product; |
| 242 | 242 | } |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | $variant->setCode($this->getUniqueCode()); |
| 260 | 260 | $variant->setOnHand($this->faker->randomNumber(1)); |
| 261 | 261 | |
| 262 | - $this->setReference('Sylius.Variant-'.$this->totalVariants, $variant); |
|
| 262 | + $this->setReference('Sylius.Variant-' . $this->totalVariants, $variant); |
|
| 263 | 263 | |
| 264 | 264 | ++$this->totalVariants; |
| 265 | 265 | } |
@@ -281,12 +281,12 @@ discard block |
||
| 281 | 281 | $variant->setTaxCategory($this->getTaxCategory('taxable')); |
| 282 | 282 | |
| 283 | 283 | $mainTaxon = $product->getMainTaxon(); |
| 284 | - $image = clone $this->getReference('Sylius.Image.'.$mainTaxon->getCode()); |
|
| 284 | + $image = clone $this->getReference('Sylius.Image.' . $mainTaxon->getCode()); |
|
| 285 | 285 | $variant->addImage($image); |
| 286 | 286 | |
| 287 | 287 | $product->addVariant($variant); |
| 288 | 288 | |
| 289 | - $this->setReference('Sylius.Variant-'.$this->totalVariants, $variant); |
|
| 289 | + $this->setReference('Sylius.Variant-' . $this->totalVariants, $variant); |
|
| 290 | 290 | |
| 291 | 291 | ++$this->totalVariants; |
| 292 | 292 | } |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | { |
| 303 | 303 | /* @var $attribute AttributeValueInterface */ |
| 304 | 304 | $attribute = $this->getProductAttributeValueFactory()->createNew(); |
| 305 | - $attribute->setAttribute($this->getReference('Sylius.Attribute.'.$code)); |
|
| 305 | + $attribute->setAttribute($this->getReference('Sylius.Attribute.' . $code)); |
|
| 306 | 306 | $attribute->setProduct($product); |
| 307 | 307 | $attribute->setValue($value); |
| 308 | 308 | |
@@ -320,7 +320,7 @@ discard block |
||
| 320 | 320 | $taxons = new ArrayCollection(); |
| 321 | 321 | |
| 322 | 322 | foreach ($taxonCodes as $taxonCode) { |
| 323 | - $taxons->add($this->getReference('Sylius.Taxon.'.$taxonCode)); |
|
| 323 | + $taxons->add($this->getReference('Sylius.Taxon.' . $taxonCode)); |
|
| 324 | 324 | } |
| 325 | 325 | |
| 326 | 326 | $product->setTaxons($taxons); |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | protected function setChannels(ProductInterface $product, array $channelCodes) |
| 336 | 336 | { |
| 337 | 337 | foreach ($channelCodes as $code) { |
| 338 | - $product->addChannel($this->getReference('Sylius.Channel.'.$code)); |
|
| 338 | + $product->addChannel($this->getReference('Sylius.Channel.' . $code)); |
|
| 339 | 339 | } |
| 340 | 340 | } |
| 341 | 341 | |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | */ |
| 347 | 347 | protected function getTaxCategory($code) |
| 348 | 348 | { |
| 349 | - return $this->getReference('Sylius.TaxCategory.'.$code); |
|
| 349 | + return $this->getReference('Sylius.TaxCategory.' . $code); |
|
| 350 | 350 | } |
| 351 | 351 | |
| 352 | 352 | /** |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | $user = $this->createUser( |
| 53 | - $username.'@example.com', |
|
| 53 | + $username . '@example.com', |
|
| 54 | 54 | $username, |
| 55 | 55 | $this->faker->boolean() |
| 56 | 56 | ); |
@@ -60,8 +60,8 @@ discard block |
||
| 60 | 60 | $manager->persist($user); |
| 61 | 61 | $this->usernames[$username] = true; |
| 62 | 62 | |
| 63 | - $this->setReference('Sylius.User-'.$i, $user); |
|
| 64 | - $this->setReference('Sylius.Customer-'.$i, $user->getCustomer()); |
|
| 63 | + $this->setReference('Sylius.User-' . $i, $user); |
|
| 64 | + $this->setReference('Sylius.Customer-' . $i, $user->getCustomer()); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | $customer = $this->getCustomerFactory()->createNew(); |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | |
| 98 | 98 | $manager->persist($country); |
| 99 | 99 | |
| 100 | - $this->setReference('Sylius.Country.'.$countryCode, $country); |
|
| 100 | + $this->setReference('Sylius.Country.' . $countryCode, $country); |
|
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | $manager->flush(); |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | $province->setCode($newProvinceCode); |
| 129 | 129 | $country->addProvince($province); |
| 130 | 130 | |
| 131 | - $this->setReference('Sylius.Province.'.$newProvinceCode, $province); |
|
| 131 | + $this->setReference('Sylius.Province.' . $newProvinceCode, $province); |
|
| 132 | 132 | } |
| 133 | 133 | } |
| 134 | 134 | } |
@@ -33,14 +33,14 @@ |
||
| 33 | 33 | $finder = new Finder(); |
| 34 | 34 | $uploader = $this->get('sylius.image_uploader'); |
| 35 | 35 | |
| 36 | - foreach ($finder->files()->in(__DIR__.$this->path) as $img) { |
|
| 36 | + foreach ($finder->files()->in(__DIR__ . $this->path) as $img) { |
|
| 37 | 37 | $image = $this->getProductVariantImageFactory()->createNew(); |
| 38 | 38 | $image->setFile(new UploadedFile($img->getRealPath(), $img->getFilename())); |
| 39 | 39 | $uploader->upload($image); |
| 40 | 40 | |
| 41 | 41 | $manager->persist($image); |
| 42 | 42 | |
| 43 | - $this->setReference('Sylius.Image.'.$img->getBasename('.jpg'), $image); |
|
| 43 | + $this->setReference('Sylius.Image.' . $img->getBasename('.jpg'), $image); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | $manager->flush(); |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | $contactRequest->setLastName($this->faker->lastName()); |
| 36 | 36 | $contactRequest->setEmail($this->faker->email()); |
| 37 | 37 | $contactRequest->setMessage($this->faker->paragraph()); |
| 38 | - $contactRequest->setTopic($this->getReference('Sylius.ContactTopic.'.rand(0, 4))); |
|
| 38 | + $contactRequest->setTopic($this->getReference('Sylius.ContactTopic.' . rand(0, 4))); |
|
| 39 | 39 | |
| 40 | 40 | $manager->persist($contactRequest); |
| 41 | 41 | } |
@@ -62,22 +62,22 @@ |
||
| 62 | 62 | $channel->setName($name); |
| 63 | 63 | $channel->setColor($this->faker->randomElement(['Red', 'Green', 'Blue', 'Orange', 'Pink'])); |
| 64 | 64 | |
| 65 | - $this->setReference('Sylius.Channel.'.$code, $channel); |
|
| 65 | + $this->setReference('Sylius.Channel.' . $code, $channel); |
|
| 66 | 66 | |
| 67 | 67 | foreach ($locales as $locale) { |
| 68 | - $channel->addLocale($this->getReference('Sylius.Locale.'.$locale)); |
|
| 68 | + $channel->addLocale($this->getReference('Sylius.Locale.' . $locale)); |
|
| 69 | 69 | } |
| 70 | 70 | foreach ($currencies as $currency) { |
| 71 | - $channel->addCurrency($this->getReference('Sylius.Currency.'.$currency)); |
|
| 71 | + $channel->addCurrency($this->getReference('Sylius.Currency.' . $currency)); |
|
| 72 | 72 | } |
| 73 | 73 | foreach ($taxons as $taxon) { |
| 74 | - $channel->addTaxon($this->getReference('Sylius.Taxon.'.$taxon)); |
|
| 74 | + $channel->addTaxon($this->getReference('Sylius.Taxon.' . $taxon)); |
|
| 75 | 75 | } |
| 76 | 76 | foreach ($shippingMethods as $shippingMethod) { |
| 77 | - $channel->addShippingMethod($this->getReference('Sylius.ShippingMethod.'.$shippingMethod)); |
|
| 77 | + $channel->addShippingMethod($this->getReference('Sylius.ShippingMethod.' . $shippingMethod)); |
|
| 78 | 78 | } |
| 79 | 79 | foreach ($paymentMethods as $paymentMethod) { |
| 80 | - $channel->addPaymentMethod($this->getReference('Sylius.PaymentMethod.'.$paymentMethod)); |
|
| 80 | + $channel->addPaymentMethod($this->getReference('Sylius.PaymentMethod.' . $paymentMethod)); |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | return $channel; |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | $attribute->setName($name); |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | - $this->setReference('Sylius.Attribute.'.$code, $attribute); |
|
| 91 | + $this->setReference('Sylius.Attribute.' . $code, $attribute); |
|
| 92 | 92 | |
| 93 | 93 | return $attribute; |
| 94 | 94 | } |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | $order->setChannel($channel); |
| 48 | 48 | |
| 49 | 49 | for ($j = 0, $items = rand(3, 6); $j <= $items; ++$j) { |
| 50 | - $variant = $this->getReference('Sylius.Variant-'.rand(1, SYLIUS_FIXTURES_TOTAL_VARIANTS - 1)); |
|
| 50 | + $variant = $this->getReference('Sylius.Variant-' . rand(1, SYLIUS_FIXTURES_TOTAL_VARIANTS - 1)); |
|
| 51 | 51 | |
| 52 | 52 | /* @var $item OrderItemInterface */ |
| 53 | 53 | $item = $orderItemFactory->createNew(); |
@@ -72,11 +72,11 @@ discard block |
||
| 72 | 72 | $order->complete(); |
| 73 | 73 | $paymentState = $this->faker->boolean(50) ? PaymentInterface::STATE_COMPLETED : PaymentInterface::STATE_NEW; |
| 74 | 74 | |
| 75 | - $order->setCustomer($this->getReference('Sylius.Customer-'.rand(1, 15))); |
|
| 75 | + $order->setCustomer($this->getReference('Sylius.Customer-' . rand(1, 15))); |
|
| 76 | 76 | $this->createPayment($order, $paymentState); |
| 77 | 77 | |
| 78 | 78 | $order->setCompletedAt($this->faker->dateTimeThisDecade); |
| 79 | - $this->setReference('Sylius.Order-'.$i, $order); |
|
| 79 | + $this->setReference('Sylius.Order-' . $i, $order); |
|
| 80 | 80 | |
| 81 | 81 | $manager->persist($order); |
| 82 | 82 | } |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | $rootTaxon->setFallbackLocale($locale); |
| 76 | 76 | $rootTaxon->setName($name); |
| 77 | 77 | } |
| 78 | - $this->setReference('Sylius.Taxon.'.$code, $rootTaxon); |
|
| 78 | + $this->setReference('Sylius.Taxon.' . $code, $rootTaxon); |
|
| 79 | 79 | |
| 80 | 80 | foreach ($childrenArray as $taxonArray) { |
| 81 | 81 | /* @var $taxon TaxonInterface */ |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | $taxon->setName($taxonName); |
| 89 | 89 | $taxon->setDescription($this->fakers[$locale]->paragraph); |
| 90 | 90 | } |
| 91 | - $this->setReference('Sylius.Taxon.'.$taxonArray['code'], $taxon); |
|
| 91 | + $this->setReference('Sylius.Taxon.' . $taxonArray['code'], $taxon); |
|
| 92 | 92 | |
| 93 | 93 | $rootTaxon->addChild($taxon); |
| 94 | 94 | } |