1 | <?php |
||
33 | class OrderFixture extends AbstractFixture |
||
34 | { |
||
35 | /** |
||
36 | * @var FactoryInterface |
||
37 | */ |
||
38 | private $orderFactory; |
||
39 | |||
40 | /** |
||
41 | * @var FactoryInterface |
||
42 | */ |
||
43 | private $orderItemFactory; |
||
44 | |||
45 | /** |
||
46 | * @var OrderItemQuantityModifierInterface |
||
47 | */ |
||
48 | private $orderItemQuantityModifier; |
||
49 | |||
50 | /** |
||
51 | * @var ObjectManager |
||
52 | */ |
||
53 | private $orderManager; |
||
54 | |||
55 | /** |
||
56 | * @var RepositoryInterface |
||
57 | */ |
||
58 | private $channelRepository; |
||
59 | |||
60 | /** |
||
61 | * @var RepositoryInterface |
||
62 | */ |
||
63 | private $customerRepository; |
||
64 | |||
65 | /** |
||
66 | * @var RepositoryInterface |
||
67 | */ |
||
68 | private $productRepository; |
||
69 | |||
70 | /** |
||
71 | * @var RepositoryInterface |
||
72 | */ |
||
73 | private $countryRepository; |
||
74 | |||
75 | /** |
||
76 | * @var PaymentMethodRepositoryInterface |
||
77 | */ |
||
78 | private $paymentMethodRepository; |
||
79 | |||
80 | /** |
||
81 | * @var ShippingMethodRepositoryInterface |
||
82 | */ |
||
83 | private $shippingMethodRepository; |
||
84 | |||
85 | /** |
||
86 | * @var FactoryInterface |
||
87 | */ |
||
88 | private $addressFactory; |
||
89 | |||
90 | /** |
||
91 | * @var StateMachineFactoryInterface |
||
92 | */ |
||
93 | private $stateMachineFactory; |
||
94 | |||
95 | /** |
||
96 | * @var OrderShippingMethodSelectionRequirementCheckerInterface |
||
97 | */ |
||
98 | private $orderShippingMethodSelectionRequirementChecker; |
||
99 | |||
100 | /** |
||
101 | * @var OrderPaymentMethodSelectionRequirementCheckerInterface |
||
102 | */ |
||
103 | private $orderPaymentMethodSelectionRequirementChecker; |
||
104 | |||
105 | /** |
||
106 | * @var \Faker\Generator |
||
107 | */ |
||
108 | private $faker; |
||
109 | |||
110 | /** |
||
111 | * @param FactoryInterface $orderFactory |
||
112 | * @param FactoryInterface $orderItemFactory |
||
113 | * @param OrderItemQuantityModifierInterface $orderItemQuantityModifier |
||
114 | * @param ObjectManager $orderManager |
||
115 | * @param RepositoryInterface $channelRepository |
||
116 | * @param RepositoryInterface $customerRepository |
||
117 | * @param RepositoryInterface $productRepository |
||
118 | * @param RepositoryInterface $countryRepository |
||
119 | * @param PaymentMethodRepositoryInterface $paymentMethodRepository |
||
120 | * @param ShippingMethodRepositoryInterface $shippingMethodRepository |
||
121 | * @param FactoryInterface $addressFactory |
||
122 | * @param StateMachineFactoryInterface $stateMachineFactory |
||
123 | * @param OrderShippingMethodSelectionRequirementCheckerInterface $orderShippingMethodSelectionRequirementChecker |
||
124 | * @param OrderPaymentMethodSelectionRequirementCheckerInterface $orderPaymentMethodSelectionRequirementChecker |
||
125 | */ |
||
126 | public function __construct( |
||
159 | |||
160 | /** |
||
161 | * {@inheritdoc} |
||
162 | */ |
||
163 | public function load(array $options) |
||
199 | |||
200 | /** |
||
201 | * {@inheritdoc} |
||
202 | */ |
||
203 | public function getName() |
||
207 | |||
208 | /** |
||
209 | * {@inheritdoc} |
||
210 | */ |
||
211 | protected function configureOptionsNode(ArrayNodeDefinition $optionsNode) |
||
218 | |||
219 | /** |
||
220 | * @param OrderInterface $order |
||
221 | */ |
||
222 | private function generateItems(OrderInterface $order) |
||
239 | |||
240 | /** |
||
241 | * @param OrderInterface $order |
||
242 | * @param string $countryCode |
||
243 | */ |
||
244 | private function address(OrderInterface $order, $countryCode) |
||
260 | |||
261 | /** |
||
262 | * @param OrderInterface $order |
||
263 | */ |
||
264 | private function selectShipping(OrderInterface $order) |
||
280 | |||
281 | /** |
||
282 | * @param OrderInterface $order |
||
283 | */ |
||
284 | private function selectPayment(OrderInterface $order) |
||
300 | |||
301 | /** |
||
302 | * @param OrderInterface $order |
||
303 | */ |
||
304 | private function completeCheckout(OrderInterface $order) |
||
312 | |||
313 | /** |
||
314 | * @param OrderInterface $order |
||
315 | * @param string $transition |
||
316 | */ |
||
317 | private function applyCheckoutStateTransition(OrderInterface $order, $transition) |
||
321 | } |
||
322 |
Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.