@@ -52,7 +52,7 @@ |
||
52 | 52 | /** |
53 | 53 | * Returns current cart. |
54 | 54 | * |
55 | - * @return null|CartInterface |
|
55 | + * @return CartInterface |
|
56 | 56 | */ |
57 | 57 | public function getCurrentCart() |
58 | 58 | { |
@@ -43,9 +43,9 @@ |
||
43 | 43 | public function getFunctions() |
44 | 44 | { |
45 | 45 | return [ |
46 | - new \Twig_SimpleFunction('sylius_cart_exists', [$this, 'hasCart']), |
|
47 | - new \Twig_SimpleFunction('sylius_cart_get', [$this, 'getCurrentCart']), |
|
48 | - new \Twig_SimpleFunction('sylius_cart_form', [$this, 'getItemFormView']), |
|
46 | + new \Twig_SimpleFunction('sylius_cart_exists', [$this, 'hasCart']), |
|
47 | + new \Twig_SimpleFunction('sylius_cart_get', [$this, 'getCurrentCart']), |
|
48 | + new \Twig_SimpleFunction('sylius_cart_form', [$this, 'getItemFormView']), |
|
49 | 49 | ]; |
50 | 50 | } |
51 | 51 |
@@ -21,6 +21,7 @@ discard block |
||
21 | 21 | { |
22 | 22 | /** |
23 | 23 | * @Given /^all products are assigned to "([^""]*)" channel$/ |
24 | + * @param string $code |
|
24 | 25 | */ |
25 | 26 | public function assignChannelToProducts($code) |
26 | 27 | { |
@@ -63,6 +64,7 @@ discard block |
||
63 | 64 | |
64 | 65 | /** |
65 | 66 | * @Given /^all promotions are assigned to "([^""]*)" channel$/ |
67 | + * @param string $code |
|
66 | 68 | */ |
67 | 69 | public function assignChannelToPromotions($code) |
68 | 70 | { |
@@ -116,6 +118,7 @@ discard block |
||
116 | 118 | |
117 | 119 | /** |
118 | 120 | * @Given /^channel "([^""]*)" has following configuration:$/ |
121 | + * @param string $code |
|
119 | 122 | */ |
120 | 123 | public function channelHasFollowingConfiguration($code, TableNode $table) |
121 | 124 | { |
@@ -287,6 +287,10 @@ discard block |
||
287 | 287 | $manager->flush(); |
288 | 288 | } |
289 | 289 | |
290 | + /** |
|
291 | + * @param string $role |
|
292 | + * @param \DateTime $createdAt |
|
293 | + */ |
|
290 | 294 | public function thereIsUser($email, $password, $role = null, $enabled = 'yes', $address = null, $groups = [], $flush = true, array $authorizationRoles = [], $createdAt = null) |
291 | 295 | { |
292 | 296 | if (null !== $user = $this->getRepository('user')->findOneByEmail($email)) { |
@@ -304,6 +308,11 @@ discard block |
||
304 | 308 | return $user; |
305 | 309 | } |
306 | 310 | |
311 | + /** |
|
312 | + * @param \DateTime $createdAt |
|
313 | + * |
|
314 | + * @return null|\Sylius\Component\User\Model\CustomerInterface |
|
315 | + */ |
|
307 | 316 | protected function thereIsCustomer($email, $address = null, $groups = [], $flush = true, $createdAt = null) |
308 | 317 | { |
309 | 318 | if (null !== $customer = $this->getRepository('customer')->findOneByEmail($email)) { |
@@ -178,6 +178,7 @@ discard block |
||
178 | 178 | |
179 | 179 | /** |
180 | 180 | * @Given there is the following metadata :metadataName: |
181 | + * @param string $metadataName |
|
181 | 182 | */ |
182 | 183 | public function thereIsTheFollowingMetadata($metadataName, TableNode $table) |
183 | 184 | { |
@@ -303,7 +304,7 @@ discard block |
||
303 | 304 | |
304 | 305 | /** |
305 | 306 | * @param ElementInterface $element |
306 | - * @param array $fields |
|
307 | + * @param string[] $fields |
|
307 | 308 | * |
308 | 309 | * @throws \Exception If assertion failed |
309 | 310 | */ |
@@ -318,7 +319,7 @@ discard block |
||
318 | 319 | * @param ElementInterface $element |
319 | 320 | * @param string[] $fields |
320 | 321 | * |
321 | - * @return ElementInterface|null |
|
322 | + * @return NodeElement|null |
|
322 | 323 | */ |
323 | 324 | private function getFormWithFields(ElementInterface $element, array $fields) |
324 | 325 | { |
@@ -344,7 +345,7 @@ discard block |
||
344 | 345 | /** |
345 | 346 | * @param string $value |
346 | 347 | * |
347 | - * @return CardInterface |
|
348 | + * @return null|CardInterface |
|
348 | 349 | */ |
349 | 350 | protected function createTwitterCardFromString($value) |
350 | 351 | { |
@@ -109,7 +109,7 @@ |
||
109 | 109 | } |
110 | 110 | |
111 | 111 | /** |
112 | - * @return FormInterface|null |
|
112 | + * @return null|\Symfony\Component\Form\Form |
|
113 | 113 | */ |
114 | 114 | protected function getGuestForm() |
115 | 115 | { |
@@ -16,8 +16,6 @@ |
||
16 | 16 | use Sylius\Component\Core\Model\CustomerInterface; |
17 | 17 | use Sylius\Component\Core\Model\OrderInterface; |
18 | 18 | use Sylius\Component\Core\Model\UserInterface; |
19 | -use Sylius\Component\Core\OrderCheckoutStates; |
|
20 | -use Sylius\Component\Core\OrderCheckoutTransitions; |
|
21 | 19 | use Sylius\Component\Core\SyliusCheckoutEvents; |
22 | 20 | use Sylius\Component\Resource\Event\ResourceEvent; |
23 | 21 | use Sylius\Component\Resource\Model\ResourceInterface; |
@@ -306,7 +306,7 @@ |
||
306 | 306 | * @param RequestConfiguration $configuration |
307 | 307 | * @param TaxonInterface $taxon |
308 | 308 | * @param Pagerfanta $results |
309 | - * @param mixed $template |
|
309 | + * @param string $template |
|
310 | 310 | * @param mixed $page |
311 | 311 | * @param mixed|null $facets |
312 | 312 | * @param mixed|null $facetTags |
@@ -45,11 +45,11 @@ |
||
45 | 45 | * @param string $code |
46 | 46 | * @param string $name |
47 | 47 | * @param string $url |
48 | - * @param array $locales |
|
49 | - * @param array $currencies |
|
50 | - * @param array $taxons |
|
51 | - * @param array $shippingMethods |
|
52 | - * @param array $paymentMethods |
|
48 | + * @param string[] $locales |
|
49 | + * @param string[] $currencies |
|
50 | + * @param string[] $taxons |
|
51 | + * @param string[] $shippingMethods |
|
52 | + * @param string[] $paymentMethods |
|
53 | 53 | * |
54 | 54 | * @return ChannelInterface |
55 | 55 | */ |
@@ -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; |
@@ -13,7 +13,6 @@ |
||
13 | 13 | |
14 | 14 | use Doctrine\Common\Persistence\ObjectManager; |
15 | 15 | use Sylius\Bundle\CoreBundle\DataFixtures\DataFixture; |
16 | -use Sylius\Component\Currency\Model\CurrencyInterface; |
|
17 | 16 | |
18 | 17 | /** |
19 | 18 | * Default currency fixtures. |
@@ -50,7 +50,7 @@ |
||
50 | 50 | $currency->setBase(true); |
51 | 51 | } |
52 | 52 | |
53 | - $this->setReference('Sylius.Currency.'.$code, $currency); |
|
53 | + $this->setReference('Sylius.Currency.' . $code, $currency); |
|
54 | 54 | |
55 | 55 | $manager->persist($currency); |
56 | 56 | } |
@@ -126,6 +126,9 @@ |
||
126 | 126 | $order->addShipment($shipment); |
127 | 127 | } |
128 | 128 | |
129 | + /** |
|
130 | + * @param OrderInterface $order |
|
131 | + */ |
|
129 | 132 | protected function dispatchEvents($order) |
130 | 133 | { |
131 | 134 | $dispatcher = $this->get('event_dispatcher'); |
@@ -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 | } |