@@ -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 | ; |
@@ -153,7 +153,7 @@ |
||
153 | 153 | /** @var CountryInterface $country */ |
154 | 154 | $countries = Intl::getRegionBundle()->getCountryNames($this->defaultLocale); |
155 | 155 | $isoName = array_rand($countries); |
156 | - $country = $this->getReference("Sylius.Country." . $isoName); |
|
156 | + $country = $this->getReference("Sylius.Country.".$isoName); |
|
157 | 157 | |
158 | 158 | $province = $country->hasProvinces() ? $this->faker->randomElement($country->getProvinces()->toArray()) : null; |
159 | 159 |
@@ -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); |
@@ -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']) { |
@@ -91,7 +91,7 @@ |
||
91 | 91 | ; |
92 | 92 | |
93 | 93 | $resolver->setNormalizers(array( |
94 | - 'model_transformer' => function (Options $options, $value) { |
|
94 | + 'model_transformer' => function(Options $options, $value) { |
|
95 | 95 | if (!is_array($value)) { |
96 | 96 | $value = array( |
97 | 97 | 'class' => $value, |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | try { |
82 | 82 | $this->filesystem->mkdir($directory, 755); |
83 | 83 | } catch (IOException $exception) { |
84 | - $output->writeln($this->createUnexistingDirectoryMessage(getcwd() . '/' . $directory)); |
|
84 | + $output->writeln($this->createUnexistingDirectoryMessage(getcwd().'/'.$directory)); |
|
85 | 85 | |
86 | 86 | throw new \RuntimeException("Failed while trying to create directory."); |
87 | 87 | } |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | private function createUnexistingDirectoryMessage($directory) |
138 | 138 | { |
139 | 139 | return |
140 | - '<error>Cannot run command due to unexisting directory (tried to create it automatically, failed).</error>' . PHP_EOL . |
|
140 | + '<error>Cannot run command due to unexisting directory (tried to create it automatically, failed).</error>'.PHP_EOL. |
|
141 | 141 | sprintf('Create directory "%s" and run command "<comment>%s</comment>"', $directory, $this->name) |
142 | 142 | ; |
143 | 143 | } |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | private function createBadPermissionsMessage($directory) |
151 | 151 | { |
152 | 152 | return |
153 | - '<error>Cannot run command due to bad directory permissions (tried to change permissions to 0755).</error>' . PHP_EOL . |
|
153 | + '<error>Cannot run command due to bad directory permissions (tried to change permissions to 0755).</error>'.PHP_EOL. |
|
154 | 154 | sprintf('Set "%s" writable recursively and run command "<comment>%s</comment>"', $directory, $this->name) |
155 | 155 | ; |
156 | 156 | } |
@@ -22,19 +22,19 @@ discard block |
||
22 | 22 | * @var array |
23 | 23 | */ |
24 | 24 | private $commands = array( |
25 | - array ( |
|
25 | + array( |
|
26 | 26 | 'command' => 'check-requirements', |
27 | 27 | 'message' => 'Checking system requirements.', |
28 | 28 | ), |
29 | - array ( |
|
29 | + array( |
|
30 | 30 | 'command' => 'database', |
31 | 31 | 'message' => 'Setting up the database.', |
32 | 32 | ), |
33 | - array ( |
|
33 | + array( |
|
34 | 34 | 'command' => 'setup', |
35 | 35 | 'message' => 'Shop configuration.', |
36 | 36 | ), |
37 | - array ( |
|
37 | + array( |
|
38 | 38 | 'command' => 'assets', |
39 | 39 | 'message' => 'Installing assets.', |
40 | 40 | ), |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | foreach ($this->commands as $step => $command) { |
74 | 74 | try { |
75 | - $output->writeln(sprintf('<comment>Step %d of %d.</comment> <info>%s</info>', $step+1, count($this->commands), $command['message'])); |
|
75 | + $output->writeln(sprintf('<comment>Step %d of %d.</comment> <info>%s</info>', $step + 1, count($this->commands), $command['message'])); |
|
76 | 76 | $this->commandExecutor->runCommand('sylius:install:'.$command['command'], array(), $output); |
77 | 77 | $output->writeln(''); |
78 | 78 | } catch (RuntimeException $exception) { |