1 | <?php |
||
31 | final class OrderFixture extends AbstractFixture |
||
32 | { |
||
33 | /** |
||
34 | * @var FactoryInterface |
||
35 | */ |
||
36 | private $orderFactory; |
||
37 | |||
38 | /** |
||
39 | * @var FactoryInterface |
||
40 | */ |
||
41 | private $orderItemFactory; |
||
42 | |||
43 | /** |
||
44 | * @var OrderItemQuantityModifierInterface |
||
45 | */ |
||
46 | private $orderItemQuantityModifier; |
||
47 | |||
48 | /** |
||
49 | * @var ObjectManager |
||
50 | */ |
||
51 | private $orderManager; |
||
52 | |||
53 | /** |
||
54 | * @var RepositoryInterface |
||
55 | */ |
||
56 | private $channelRepository; |
||
57 | |||
58 | /** |
||
59 | * @var RepositoryInterface |
||
60 | */ |
||
61 | private $customerRepository; |
||
62 | |||
63 | /** |
||
64 | * @var RepositoryInterface |
||
65 | */ |
||
66 | private $productRepository; |
||
67 | |||
68 | /** |
||
69 | * @var RepositoryInterface |
||
70 | */ |
||
71 | private $countryRepository; |
||
72 | |||
73 | /** |
||
74 | * @var PaymentMethodRepositoryInterface |
||
75 | */ |
||
76 | private $paymentMethodRepository; |
||
77 | |||
78 | /** |
||
79 | * @var ShippingMethodRepositoryInterface |
||
80 | */ |
||
81 | private $shippingMethodRepository; |
||
82 | |||
83 | /** |
||
84 | * @var FactoryInterface |
||
85 | */ |
||
86 | private $addressFactory; |
||
87 | |||
88 | /** |
||
89 | * @var StateMachineFactoryInterface |
||
90 | */ |
||
91 | private $stateMachineFactory; |
||
92 | |||
93 | /** |
||
94 | * @var \Faker\Generator |
||
95 | */ |
||
96 | private $faker; |
||
97 | |||
98 | /** |
||
99 | * @param FactoryInterface $orderFactory |
||
100 | * @param FactoryInterface $orderItemFactory |
||
101 | * @param OrderItemQuantityModifierInterface $orderItemQuantityModifier |
||
102 | * @param ObjectManager $orderManager |
||
103 | * @param RepositoryInterface $channelRepository |
||
104 | * @param RepositoryInterface $customerRepository |
||
105 | * @param RepositoryInterface $productRepository |
||
106 | * @param RepositoryInterface $countryRepository |
||
107 | * @param PaymentMethodRepositoryInterface $paymentMethodRepository |
||
108 | * @param ShippingMethodRepositoryInterface $shippingMethodRepository |
||
109 | * @param FactoryInterface $addressFactory |
||
110 | * @param StateMachineFactoryInterface $stateMachineFactory |
||
111 | */ |
||
112 | public function __construct( |
||
141 | |||
142 | /** |
||
143 | * {@inheritdoc} |
||
144 | */ |
||
145 | public function load(array $options) |
||
181 | |||
182 | /** |
||
183 | * {@inheritdoc} |
||
184 | */ |
||
185 | public function getName() |
||
189 | |||
190 | /** |
||
191 | * {@inheritdoc} |
||
192 | */ |
||
193 | protected function configureOptionsNode(ArrayNodeDefinition $optionsNode) |
||
200 | |||
201 | /** |
||
202 | * @param OrderInterface $order |
||
203 | */ |
||
204 | private function generateItems(OrderInterface $order) |
||
221 | |||
222 | /** |
||
223 | * @param OrderInterface $order |
||
224 | * @param string $countryCode |
||
225 | */ |
||
226 | private function address(OrderInterface $order, $countryCode) |
||
242 | |||
243 | /** |
||
244 | * @param OrderInterface $order |
||
245 | */ |
||
246 | private function selectShipping(OrderInterface $order) |
||
261 | |||
262 | /** |
||
263 | * @param OrderInterface $order |
||
264 | */ |
||
265 | private function selectPayment(OrderInterface $order) |
||
280 | |||
281 | /** |
||
282 | * @param OrderInterface $order |
||
283 | */ |
||
284 | private function completeCheckout(OrderInterface $order) |
||
292 | |||
293 | /** |
||
294 | * @param OrderInterface $order |
||
295 | * @param string $transition |
||
296 | */ |
||
297 | private function applyCheckoutStateTransition(OrderInterface $order, $transition) |
||
301 | } |
||
302 |
Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.