@@ -51,13 +51,13 @@ discard block |
||
51 | 51 | |
52 | 52 | public function it_fetches_data_by_day($orderRepository) |
53 | 53 | { |
54 | - $rawData = array(array('date' => '2014-12-31', 'number_of_orders' => '20'),array('date' => '2015-01-01', 'number_of_orders' => '2')); |
|
54 | + $rawData = array(array('date' => '2014-12-31', 'number_of_orders' => '20'), array('date' => '2015-01-01', 'number_of_orders' => '2')); |
|
55 | 55 | |
56 | 56 | $configuration = array( |
57 | 57 | 'start' => new \DateTime('2014-12-31 00:00:00.000000'), |
58 | 58 | 'end' => new \DateTime('2015-01-01 00:00:00.000000'), |
59 | 59 | 'period' => 'day', |
60 | - 'empty_records' => false, ); |
|
60 | + 'empty_records' => false,); |
|
61 | 61 | |
62 | 62 | $orderRepository->ordersBetweenDatesGroupByDate(Argument::type('array'))->willReturn($rawData); |
63 | 63 | |
@@ -70,13 +70,13 @@ discard block |
||
70 | 70 | |
71 | 71 | public function it_fetches_data_by_month($orderRepository) |
72 | 72 | { |
73 | - $rawData = array(array('date' => '2014-12-30', 'number_of_orders' => '20'),array('date' => '2015-01-01', 'number_of_orders' => '2')); |
|
73 | + $rawData = array(array('date' => '2014-12-30', 'number_of_orders' => '20'), array('date' => '2015-01-01', 'number_of_orders' => '2')); |
|
74 | 74 | |
75 | 75 | $configuration = array( |
76 | 76 | 'start' => new \DateTime('2014-12-01 00:00:00.000000'), |
77 | 77 | 'end' => new \DateTime('2015-01-03 00:00:00.000000'), |
78 | 78 | 'period' => 'month', |
79 | - 'empty_records' => false, ); |
|
79 | + 'empty_records' => false,); |
|
80 | 80 | |
81 | 81 | $orderRepository->ordersBetweenDatesGroupByDate(Argument::type('array'))->willReturn($rawData); |
82 | 82 | |
@@ -89,13 +89,13 @@ discard block |
||
89 | 89 | |
90 | 90 | public function it_fetches_data_by_year($orderRepository) |
91 | 91 | { |
92 | - $rawData = array(array('date' => '2014-01-01', 'number_of_orders' => '20'),array('date' => '2015-01-30', 'number_of_orders' => '2')); |
|
92 | + $rawData = array(array('date' => '2014-01-01', 'number_of_orders' => '20'), array('date' => '2015-01-30', 'number_of_orders' => '2')); |
|
93 | 93 | |
94 | 94 | $configuration = array( |
95 | 95 | 'start' => new \DateTime('2014-12-31 00:00:00.000000'), |
96 | 96 | 'end' => new \DateTime('2015-01-01 00:00:00.000000'), |
97 | 97 | 'period' => 'year', |
98 | - 'empty_records' => false, ); |
|
98 | + 'empty_records' => false,); |
|
99 | 99 | |
100 | 100 | $orderRepository->ordersBetweenDatesGroupByDate(Argument::type('array'))->willReturn($rawData); |
101 | 101 | |
@@ -108,13 +108,13 @@ discard block |
||
108 | 108 | |
109 | 109 | public function it_fills_gaps($orderRepository) |
110 | 110 | { |
111 | - $rawData = array(array('date' => '2014-12-30', 'number_of_orders' => '20'),array('date' => '2015-01-01', 'number_of_orders' => '2')); |
|
111 | + $rawData = array(array('date' => '2014-12-30', 'number_of_orders' => '20'), array('date' => '2015-01-01', 'number_of_orders' => '2')); |
|
112 | 112 | |
113 | 113 | $configuration = array( |
114 | 114 | 'start' => new \DateTime('2014-11-01 00:00:00.000000'), |
115 | 115 | 'end' => new \DateTime('2015-01-03 00:00:00.000000'), |
116 | 116 | 'period' => 'month', |
117 | - 'empty_records' => true, ); |
|
117 | + 'empty_records' => true,); |
|
118 | 118 | |
119 | 119 | $orderRepository->ordersBetweenDatesGroupByDate(Argument::type('array'))->willReturn($rawData); |
120 | 120 | |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | 'start' => new \DateTime('2010-01-01 00:00:00.000000'), |
132 | 132 | 'end' => new \DateTime('2012-01-01 00:00:00.000000'), |
133 | 133 | 'period' => 3, |
134 | - 'empty_records' => false, ); |
|
134 | + 'empty_records' => false,); |
|
135 | 135 | $this |
136 | 136 | ->shouldThrow(new \InvalidArgumentException('Wrong data fetcher period')) |
137 | 137 | ->duringFetch($configuration) |
@@ -51,13 +51,13 @@ discard block |
||
51 | 51 | |
52 | 52 | public function it_fetches_data_by_day($orderRepository) |
53 | 53 | { |
54 | - $rawData = array(array('date' => '2014-12-31', 'total_sale' => '20'),array('date' => '2015-01-01', 'total_sale' => '2')); |
|
54 | + $rawData = array(array('date' => '2014-12-31', 'total_sale' => '20'), array('date' => '2015-01-01', 'total_sale' => '2')); |
|
55 | 55 | |
56 | 56 | $configuration = array( |
57 | 57 | 'start' => new \DateTime('2014-12-31 00:00:00.000000'), |
58 | 58 | 'end' => new \DateTime('2015-01-01 00:00:00.000000'), |
59 | 59 | 'period' => 'day', |
60 | - 'empty_records' => false, ); |
|
60 | + 'empty_records' => false,); |
|
61 | 61 | |
62 | 62 | $orderRepository->revenueBetweenDatesGroupByDate(Argument::type('array'))->willReturn($rawData); |
63 | 63 | |
@@ -70,13 +70,13 @@ discard block |
||
70 | 70 | |
71 | 71 | public function it_fetches_data_by_month($orderRepository) |
72 | 72 | { |
73 | - $rawData = array(array('date' => '2014-12-30', 'total_sale' => '20'),array('date' => '2015-01-01', 'total_sale' => '2')); |
|
73 | + $rawData = array(array('date' => '2014-12-30', 'total_sale' => '20'), array('date' => '2015-01-01', 'total_sale' => '2')); |
|
74 | 74 | |
75 | 75 | $configuration = array( |
76 | 76 | 'start' => new \DateTime('2014-12-01 00:00:00.000000'), |
77 | 77 | 'end' => new \DateTime('2015-01-03 00:00:00.000000'), |
78 | 78 | 'period' => 'month', |
79 | - 'empty_records' => false, ); |
|
79 | + 'empty_records' => false,); |
|
80 | 80 | |
81 | 81 | $orderRepository->revenueBetweenDatesGroupByDate(Argument::type('array'))->willReturn($rawData); |
82 | 82 | |
@@ -89,13 +89,13 @@ discard block |
||
89 | 89 | |
90 | 90 | public function it_fetches_data_by_year($orderRepository) |
91 | 91 | { |
92 | - $rawData = array(array('date' => '2014-01-01', 'total_sale' => '20'),array('date' => '2015-01-30', 'total_sale' => '2')); |
|
92 | + $rawData = array(array('date' => '2014-01-01', 'total_sale' => '20'), array('date' => '2015-01-30', 'total_sale' => '2')); |
|
93 | 93 | |
94 | 94 | $configuration = array( |
95 | 95 | 'start' => new \DateTime('2014-12-31 00:00:00.000000'), |
96 | 96 | 'end' => new \DateTime('2015-01-01 00:00:00.000000'), |
97 | 97 | 'period' => 'year', |
98 | - 'empty_records' => false, ); |
|
98 | + 'empty_records' => false,); |
|
99 | 99 | |
100 | 100 | $orderRepository->revenueBetweenDatesGroupByDate(Argument::type('array'))->willReturn($rawData); |
101 | 101 | |
@@ -108,13 +108,13 @@ discard block |
||
108 | 108 | |
109 | 109 | public function it_fills_gaps($orderRepository) |
110 | 110 | { |
111 | - $rawData = array(array('date' => '2014-12-30', 'total_sale' => '20'),array('date' => '2015-01-01', 'total_sale' => '2')); |
|
111 | + $rawData = array(array('date' => '2014-12-30', 'total_sale' => '20'), array('date' => '2015-01-01', 'total_sale' => '2')); |
|
112 | 112 | |
113 | 113 | $configuration = array( |
114 | 114 | 'start' => new \DateTime('2014-11-01 00:00:00.000000'), |
115 | 115 | 'end' => new \DateTime('2015-01-03 00:00:00.000000'), |
116 | 116 | 'period' => 'month', |
117 | - 'empty_records' => true, ); |
|
117 | + 'empty_records' => true,); |
|
118 | 118 | |
119 | 119 | $orderRepository->revenueBetweenDatesGroupByDate(Argument::type('array'))->willReturn($rawData); |
120 | 120 | |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | 'start' => new \DateTime('2010-01-01 00:00:00.000000'), |
132 | 132 | 'end' => new \DateTime('2012-01-01 00:00:00.000000'), |
133 | 133 | 'period' => 3, |
134 | - 'empty_records' => false, ); |
|
134 | + 'empty_records' => false,); |
|
135 | 135 | $this |
136 | 136 | ->shouldThrow(new \InvalidArgumentException('Wrong data fetcher period')) |
137 | 137 | ->duringFetch($configuration) |
@@ -51,13 +51,13 @@ discard block |
||
51 | 51 | |
52 | 52 | public function it_fetches_data_by_day($userRepository) |
53 | 53 | { |
54 | - $rawData = array(array('date' => '2014-12-31', 'user_total' => '20'),array('date' => '2015-01-01', 'user_total' => '2')); |
|
54 | + $rawData = array(array('date' => '2014-12-31', 'user_total' => '20'), array('date' => '2015-01-01', 'user_total' => '2')); |
|
55 | 55 | |
56 | 56 | $configuration = array( |
57 | 57 | 'start' => new \DateTime('2014-12-31 00:00:00.000000'), |
58 | 58 | 'end' => new \DateTime('2015-01-01 00:00:00.000000'), |
59 | 59 | 'period' => 'day', |
60 | - 'empty_records' => false, ); |
|
60 | + 'empty_records' => false,); |
|
61 | 61 | |
62 | 62 | $userRepository->getRegistrationStatistic(Argument::type('array'))->willReturn($rawData); |
63 | 63 | |
@@ -70,13 +70,13 @@ discard block |
||
70 | 70 | |
71 | 71 | public function it_fetches_data_by_month($userRepository) |
72 | 72 | { |
73 | - $rawData = array(array('date' => '2014-12-30', 'user_total' => '20'),array('date' => '2015-01-01', 'user_total' => '2')); |
|
73 | + $rawData = array(array('date' => '2014-12-30', 'user_total' => '20'), array('date' => '2015-01-01', 'user_total' => '2')); |
|
74 | 74 | |
75 | 75 | $configuration = array( |
76 | 76 | 'start' => new \DateTime('2014-12-01 00:00:00.000000'), |
77 | 77 | 'end' => new \DateTime('2015-01-03 00:00:00.000000'), |
78 | 78 | 'period' => 'month', |
79 | - 'empty_records' => false, ); |
|
79 | + 'empty_records' => false,); |
|
80 | 80 | |
81 | 81 | $userRepository->getRegistrationStatistic(Argument::type('array'))->willReturn($rawData); |
82 | 82 | |
@@ -89,13 +89,13 @@ discard block |
||
89 | 89 | |
90 | 90 | public function it_fetches_data_by_year($userRepository) |
91 | 91 | { |
92 | - $rawData = array(array('date' => '2014-01-01', 'user_total' => '20'),array('date' => '2015-01-30', 'user_total' => '2')); |
|
92 | + $rawData = array(array('date' => '2014-01-01', 'user_total' => '20'), array('date' => '2015-01-30', 'user_total' => '2')); |
|
93 | 93 | |
94 | 94 | $configuration = array( |
95 | 95 | 'start' => new \DateTime('2014-12-31 00:00:00.000000'), |
96 | 96 | 'end' => new \DateTime('2015-01-01 00:00:00.000000'), |
97 | 97 | 'period' => 'year', |
98 | - 'empty_records' => false, ); |
|
98 | + 'empty_records' => false,); |
|
99 | 99 | |
100 | 100 | $userRepository->getRegistrationStatistic(Argument::type('array'))->willReturn($rawData); |
101 | 101 | |
@@ -108,13 +108,13 @@ discard block |
||
108 | 108 | |
109 | 109 | public function it_fills_gaps($userRepository) |
110 | 110 | { |
111 | - $rawData = array(array('date' => '2014-12-30', 'user_total' => '20'),array('date' => '2015-01-01', 'user_total' => '2')); |
|
111 | + $rawData = array(array('date' => '2014-12-30', 'user_total' => '20'), array('date' => '2015-01-01', 'user_total' => '2')); |
|
112 | 112 | |
113 | 113 | $configuration = array( |
114 | 114 | 'start' => new \DateTime('2014-11-01 00:00:00.000000'), |
115 | 115 | 'end' => new \DateTime('2015-01-03 00:00:00.000000'), |
116 | 116 | 'period' => 'month', |
117 | - 'empty_records' => true, ); |
|
117 | + 'empty_records' => true,); |
|
118 | 118 | |
119 | 119 | $userRepository->getRegistrationStatistic(Argument::type('array'))->willReturn($rawData); |
120 | 120 | |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | 'start' => new \DateTime('2010-01-01 00:00:00.000000'), |
132 | 132 | 'end' => new \DateTime('2012-01-01 00:00:00.000000'), |
133 | 133 | 'period' => 3, |
134 | - 'empty_records' => false, ); |
|
134 | + 'empty_records' => false,); |
|
135 | 135 | $this |
136 | 136 | ->shouldThrow(new \InvalidArgumentException('Wrong data fetcher period')) |
137 | 137 | ->duringFetch($configuration) |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | |
103 | 103 | $gateway |
104 | 104 | ->execute(Argument::type(GetStatus::class)) |
105 | - ->will(function ($args) use ($order, $paymentModel) { |
|
105 | + ->will(function($args) use ($order, $paymentModel) { |
|
106 | 106 | $args[0]->markCaptured(); |
107 | 107 | $args[0]->setModel($paymentModel); |
108 | 108 | } |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | |
152 | 152 | $gateway |
153 | 153 | ->execute(Argument::type(GetStatus::class)) |
154 | - ->will(function ($args) use ($order, $paymentModel) { |
|
154 | + ->will(function($args) use ($order, $paymentModel) { |
|
155 | 155 | $args[0]->markCaptured(); |
156 | 156 | $args[0]->setModel($paymentModel); |
157 | 157 | } |
@@ -334,7 +334,7 @@ |
||
334 | 334 | $min = (int) trim(str_replace('+', '', $data['range'])); |
335 | 335 | $max = null; |
336 | 336 | } else { |
337 | - list($min, $max) = array_map(function ($value) { return (int) trim($value); }, explode('-', $data['range'])); |
|
337 | + list($min, $max) = array_map(function($value) { return (int) trim($value); }, explode('-', $data['range'])); |
|
338 | 338 | } |
339 | 339 | |
340 | 340 | $configuration[] = array( |
@@ -51,7 +51,7 @@ |
||
51 | 51 | ->setDisplayRoute('sylius_checkout_display') |
52 | 52 | ->setForwardRoute('sylius_checkout_forward') |
53 | 53 | ->setRedirect('sylius_homepage') |
54 | - ->validate(function () { |
|
54 | + ->validate(function() { |
|
55 | 55 | return !$this->getCurrentCart()->isEmpty(); |
56 | 56 | }) |
57 | 57 | ; |
@@ -96,11 +96,11 @@ |
||
96 | 96 | |
97 | 97 | $calculatorTypeName = sprintf("sylius_shipping_calculator_%s", $calculator->getType()); |
98 | 98 | |
99 | - if(!$this->formRegistry->hasType($calculatorTypeName)){ |
|
99 | + if (!$this->formRegistry->hasType($calculatorTypeName)) { |
|
100 | 100 | continue; |
101 | 101 | } |
102 | 102 | |
103 | - $prototypes['calculators'][$name] = $builder->create('configuration',$calculatorTypeName)->getForm(); |
|
103 | + $prototypes['calculators'][$name] = $builder->create('configuration', $calculatorTypeName)->getForm(); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | $builder->setAttribute('prototypes', $prototypes); |
@@ -202,8 +202,8 @@ |
||
202 | 202 | ->arrayNode('form') |
203 | 203 | ->addDefaultsIfNotSet() |
204 | 204 | ->children() |
205 | - ->scalarNode('default')->defaultValue(ShippingCategoryType::class)->cannotBeEmpty()->end() |
|
206 | - ->scalarNode('choice')->defaultValue(ResourceChoiceType::class)->cannotBeEmpty()->end() |
|
205 | + ->scalarNode('default')->defaultValue(ShippingCategoryType::class)->cannotBeEmpty()->end() |
|
206 | + ->scalarNode('choice')->defaultValue(ResourceChoiceType::class)->cannotBeEmpty()->end() |
|
207 | 207 | ->end() |
208 | 208 | ->end() |
209 | 209 | ->end() |
@@ -64,7 +64,7 @@ |
||
64 | 64 | public function configureOptions(OptionsResolver $resolver) |
65 | 65 | { |
66 | 66 | $repository = $this->taxonRepository; |
67 | - $choiceList = function (Options $options) use ($repository) { |
|
67 | + $choiceList = function(Options $options) use ($repository) { |
|
68 | 68 | $taxons = $repository->getNonRootTaxons(); |
69 | 69 | |
70 | 70 | if (null !== $options['taxonomy']) { |