Completed
Push — phpspec-7 ( 2faf6a )
by Kamil
62:22 queued 34:00
created
src/Sylius/Component/Core/Repository/OrderRepositoryInterface.php 2 patches
Doc Comments   +12 added lines patch added patch discarded remove patch
@@ -75,12 +75,24 @@
 block discarded – undo
75 75
      */
76 76
     public function findOrdersUnpaidSince(\DateTimeInterface $terminalDate): array;
77 77
 
78
+    /**
79
+     * @return OrderInterface
80
+     */
78 81
     public function findCartForSummary($id): ?OrderInterface;
79 82
 
83
+    /**
84
+     * @return OrderInterface
85
+     */
80 86
     public function findCartForAddressing($id): ?OrderInterface;
81 87
 
88
+    /**
89
+     * @return OrderInterface
90
+     */
82 91
     public function findCartForSelectingShipping($id): ?OrderInterface;
83 92
 
93
+    /**
94
+     * @return OrderInterface
95
+     */
84 96
     public function findCartForSelectingPayment($id): ?OrderInterface;
85 97
 
86 98
     public function findCartByTokenValue(string $tokenValue): ?BaseOrderInterface;
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@
 block discarded – undo
17 17
 use Sylius\Component\Core\Model\ChannelInterface;
18 18
 use Sylius\Component\Core\Model\CustomerInterface;
19 19
 use Sylius\Component\Core\Model\OrderInterface;
20
-use Sylius\Component\Order\Model\OrderInterface as BaseOrderInterface;
21 20
 use Sylius\Component\Core\Model\PromotionCouponInterface;
21
+use Sylius\Component\Order\Model\OrderInterface as BaseOrderInterface;
22 22
 use Sylius\Component\Order\Repository\OrderRepositoryInterface as BaseOrderRepositoryInterface;
23 23
 
24 24
 interface OrderRepositoryInterface extends BaseOrderRepositoryInterface
Please login to merge, or discard this patch.
src/Sylius/Component/Core/Repository/PaymentRepositoryInterface.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -22,6 +22,9 @@
 block discarded – undo
22 22
 {
23 23
     public function createListQueryBuilder(): QueryBuilder;
24 24
 
25
+    /**
26
+     * @param string $paymentId
27
+     */
25 28
     public function findOneByOrderId($paymentId, $orderId): ?PaymentInterface;
26 29
 
27 30
     public function findOneByCustomer($id, CustomerInterface $customer): ?PaymentInterface;
Please login to merge, or discard this patch.
src/Sylius/Component/Core/Repository/ShipmentRepositoryInterface.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -22,6 +22,9 @@
 block discarded – undo
22 22
 {
23 23
     public function createListQueryBuilder(): QueryBuilder;
24 24
 
25
+    /**
26
+     * @param string $shipmentId
27
+     */
25 28
     public function findOneByOrderId($shipmentId, $orderId): ?ShipmentInterface;
26 29
 
27 30
     public function findOneByCustomer($id, CustomerInterface $customer): ?ShipmentInterface;
Please login to merge, or discard this patch.
src/Sylius/Component/Order/Model/AdjustmentInterface.php 1 patch
Doc Comments   +42 added lines patch added patch discarded remove patch
@@ -20,28 +20,55 @@  discard block
 block discarded – undo
20 20
 {
21 21
     public function getAdjustable(): ?AdjustableInterface;
22 22
 
23
+    /**
24
+     * @return void
25
+     */
23 26
     public function setAdjustable(?AdjustableInterface $adjustable): void;
24 27
 
28
+    /**
29
+     * @return string|null
30
+     */
25 31
     public function getType(): ?string;
26 32
 
33
+    /**
34
+     * @return void
35
+     */
27 36
     public function setType(?string $type): void;
28 37
 
38
+    /**
39
+     * @return string|null
40
+     */
29 41
     public function getLabel(): ?string;
30 42
 
43
+    /**
44
+     * @return void
45
+     */
31 46
     public function setLabel(?string $label): void;
32 47
 
33 48
     public function getAmount(): int;
34 49
 
50
+    /**
51
+     * @return void
52
+     */
35 53
     public function setAmount(int $amount): void;
36 54
 
37 55
     public function isNeutral(): bool;
38 56
 
57
+    /**
58
+     * @return void
59
+     */
39 60
     public function setNeutral(bool $neutral): void;
40 61
 
41 62
     public function isLocked(): bool;
42 63
 
64
+    /**
65
+     * @return void
66
+     */
43 67
     public function lock(): void;
44 68
 
69
+    /**
70
+     * @return void
71
+     */
45 72
     public function unlock(): void;
46 73
 
47 74
     /**
@@ -54,13 +81,28 @@  discard block
 block discarded – undo
54 81
      */
55 82
     public function isCredit(): bool;
56 83
 
84
+    /**
85
+     * @return string|null
86
+     */
57 87
     public function getOriginCode(): ?string;
58 88
 
89
+    /**
90
+     * @return void
91
+     */
59 92
     public function setOriginCode(?string $originCode): void;
60 93
 
94
+    /**
95
+     * @return OrderInterface|null
96
+     */
61 97
     public function getOrder(): ?OrderInterface;
62 98
 
99
+    /**
100
+     * @return OrderItemInterface|null
101
+     */
63 102
     public function getOrderItem(): ?OrderItemInterface;
64 103
 
104
+    /**
105
+     * @return OrderItemUnitInterface|null
106
+     */
65 107
     public function getOrderItemUnit(): ?OrderItemUnitInterface;
66 108
 }
Please login to merge, or discard this patch.
src/Sylius/Component/Order/Model/OrderInterface.php 1 patch
Doc Comments   +43 added lines patch added patch discarded remove patch
@@ -27,20 +27,45 @@  discard block
 block discarded – undo
27 27
 
28 28
     public const STATE_FULFILLED = 'fulfilled';
29 29
 
30
+    /**
31
+     * @return \DateTimeInterface|null
32
+     */
30 33
     public function getCheckoutCompletedAt(): ?\DateTimeInterface;
31 34
 
35
+    /**
36
+     * @param \DateTimeInterface $checkoutCompletedAt
37
+     *
38
+     * @return void
39
+     */
32 40
     public function setCheckoutCompletedAt(?\DateTimeInterface $checkoutCompletedAt): void;
33 41
 
34 42
     public function isCheckoutCompleted(): bool;
35 43
 
44
+    /**
45
+     * @return void
46
+     */
36 47
     public function completeCheckout(): void;
37 48
 
49
+    /**
50
+     * @return string|null
51
+     */
38 52
     public function getNumber(): ?string;
39 53
 
54
+    /**
55
+     * @return void
56
+     */
40 57
     public function setNumber(?string $number): void;
41 58
 
59
+    /**
60
+     * @return string|null
61
+     */
42 62
     public function getNotes(): ?string;
43 63
 
64
+    /**
65
+     * @param string|null $notes
66
+     *
67
+     * @return void
68
+     */
44 69
     public function setNotes(?string $notes): void;
45 70
 
46 71
     /**
@@ -50,18 +75,30 @@  discard block
 block discarded – undo
50 75
      */
51 76
     public function getItems(): Collection;
52 77
 
78
+    /**
79
+     * @return void
80
+     */
53 81
     public function clearItems(): void;
54 82
 
55 83
     public function countItems(): int;
56 84
 
85
+    /**
86
+     * @return void
87
+     */
57 88
     public function addItem(OrderItemInterface $item): void;
58 89
 
90
+    /**
91
+     * @return void
92
+     */
59 93
     public function removeItem(OrderItemInterface $item): void;
60 94
 
61 95
     public function hasItem(OrderItemInterface $item): bool;
62 96
 
63 97
     public function getItemsTotal(): int;
64 98
 
99
+    /**
100
+     * @return void
101
+     */
65 102
     public function recalculateItemsTotal(): void;
66 103
 
67 104
     public function getTotal(): int;
@@ -70,6 +107,9 @@  discard block
 block discarded – undo
70 107
 
71 108
     public function getState(): string;
72 109
 
110
+    /**
111
+     * @return void
112
+     */
73 113
     public function setState(string $state): void;
74 114
 
75 115
     public function isEmpty(): bool;
@@ -83,5 +123,8 @@  discard block
 block discarded – undo
83 123
 
84 124
     public function getAdjustmentsTotalRecursively(?string $type = null): int;
85 125
 
126
+    /**
127
+     * @return void
128
+     */
86 129
     public function removeAdjustmentsRecursively(?string $type = null): void;
87 130
 }
Please login to merge, or discard this patch.
spec/Validator/Constraints/PromotionCouponEligibilityValidatorSpec.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,9 @@
 block discarded – undo
51 51
 
52 52
     function it_throws_an_exception_if_constraint_is_not_of_expected_type(): void
53 53
     {
54
-        $this->shouldThrow(\InvalidArgumentException::class)->during('validate', ['', new class() extends Constraint {}]);
54
+        $this->shouldThrow(\InvalidArgumentException::class)->during('validate', ['', new class() extends Constraint
55
+        {
56
+}]);
55 57
     }
56 58
 
57 59
     function it_does_not_add_violation_if_promotion_coupon_is_eligible(
Please login to merge, or discard this patch.
ApiBundle/Validator/Constraints/PromotionCouponEligibilityValidator.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
         /** @var PromotionCouponInterface $promotionCoupon */
60 60
         $promotionCoupon = $this->promotionCouponRepository->findOneBy(['code' => $value->couponCode]);
61 61
 
62
-       /** @var OrderInterface $cart*/
62
+        /** @var OrderInterface $cart*/
63 63
         $cart = $this->orderRepository->findCartByTokenValue($value->getOrderTokenValue());
64 64
 
65 65
         $cart->setPromotionCoupon($promotionCoupon);
Please login to merge, or discard this patch.
Bundle/ApiBundle/ApiPlatform/Bridge/Symfony/Routing/RouteNameResolver.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,8 +56,7 @@
 block discarded – undo
56 56
             ) {
57 57
                 if (
58 58
                     OperationType::SUBRESOURCE === $operationType &&
59
-                    false === $this->isSameSubresource($context, $route->getDefault('_api_subresource_context')))
60
-                {
59
+                    false === $this->isSameSubresource($context, $route->getDefault('_api_subresource_context'))) {
61 60
                     continue;
62 61
                 }
63 62
 
Please login to merge, or discard this patch.
src/Sylius/Behat/Context/Setup/CheckoutContext.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
         $command->setOrderTokenValue($cartToken);
82 82
         $this->commandBus->dispatch($command);
83 83
 
84
-       $this->completeCheckout($cart);
84
+        $this->completeCheckout($cart);
85 85
     }
86 86
 
87 87
     /**
Please login to merge, or discard this patch.