@@ -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']) { |
@@ -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) { |
@@ -60,7 +60,7 @@ |
||
60 | 60 | ->booleanNode('guest_order') |
61 | 61 | ->beforeNormalization() |
62 | 62 | ->ifString() |
63 | - ->then(function ($v) { return (bool) $v; }) |
|
63 | + ->then(function($v) { return (bool) $v; }) |
|
64 | 64 | ->end() |
65 | 65 | ->defaultFalse() |
66 | 66 | ->end() |
@@ -44,7 +44,7 @@ |
||
44 | 44 | $resolver |
45 | 45 | ->setDefaults(array( |
46 | 46 | 'data_class' => $this->dataClass, |
47 | - 'validation_groups' => function (FormInterface $form) { |
|
47 | + 'validation_groups' => function(FormInterface $form) { |
|
48 | 48 | $data = $form->getData(); |
49 | 49 | if ($data && !$data->getId()) { |
50 | 50 | $this->validationGroups[] = 'sylius_user_create'; |
@@ -54,7 +54,7 @@ |
||
54 | 54 | */ |
55 | 55 | public function configureOptions(OptionsResolver $resolver) |
56 | 56 | { |
57 | - $choiceList = function (Options $options) { |
|
57 | + $choiceList = function(Options $options) { |
|
58 | 58 | if (null === $options['enabled']) { |
59 | 59 | $choices = $this->localeRepository->findAll(); |
60 | 60 | } else { |
@@ -17,18 +17,18 @@ discard block |
||
17 | 17 | while ($dir !== $lastDir) { |
18 | 18 | $lastDir = $dir; |
19 | 19 | |
20 | - if (file_exists($dir . '/autoload.php')) { |
|
21 | - require_once $dir . '/autoload.php'; |
|
20 | + if (file_exists($dir.'/autoload.php')) { |
|
21 | + require_once $dir.'/autoload.php'; |
|
22 | 22 | break; |
23 | 23 | } |
24 | 24 | |
25 | - if (file_exists($dir . '/autoload.php.dist')) { |
|
26 | - require_once $dir . '/autoload.php.dist'; |
|
25 | + if (file_exists($dir.'/autoload.php.dist')) { |
|
26 | + require_once $dir.'/autoload.php.dist'; |
|
27 | 27 | break; |
28 | 28 | } |
29 | 29 | |
30 | - if (file_exists($dir . '/vendor/autoload.php')) { |
|
31 | - require_once $dir . '/vendor/autoload.php'; |
|
30 | + if (file_exists($dir.'/vendor/autoload.php')) { |
|
31 | + require_once $dir.'/vendor/autoload.php'; |
|
32 | 32 | break; |
33 | 33 | } |
34 | 34 | |
@@ -51,13 +51,13 @@ discard block |
||
51 | 51 | |
52 | 52 | public function __construct($testCase, $rootConfig, $environment, $debug) |
53 | 53 | { |
54 | - if (!is_dir(__DIR__ . '/' . $testCase)) { |
|
54 | + if (!is_dir(__DIR__.'/'.$testCase)) { |
|
55 | 55 | throw new \InvalidArgumentException(sprintf('The test case "%s" does not exist.', $testCase)); |
56 | 56 | } |
57 | 57 | $this->testCase = $testCase; |
58 | 58 | |
59 | 59 | $fs = new Filesystem(); |
60 | - if (!$fs->isAbsolutePath($rootConfig) && !file_exists($rootConfig = __DIR__ . '/' . $testCase . '/' . $rootConfig)) { |
|
60 | + if (!$fs->isAbsolutePath($rootConfig) && !file_exists($rootConfig = __DIR__.'/'.$testCase.'/'.$rootConfig)) { |
|
61 | 61 | throw new \InvalidArgumentException(sprintf('The root config "%s" does not exist.', $rootConfig)); |
62 | 62 | } |
63 | 63 | $this->rootConfig = $rootConfig; |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | |
68 | 68 | public function registerBundles() |
69 | 69 | { |
70 | - if (!file_exists($filename = $this->getRootDir() . '/' . $this->testCase . '/bundles.php')) { |
|
70 | + if (!file_exists($filename = $this->getRootDir().'/'.$this->testCase.'/bundles.php')) { |
|
71 | 71 | throw new \RuntimeException(sprintf('The bundles file "%s" does not exist.', $filename)); |
72 | 72 | } |
73 | 73 | |
@@ -81,12 +81,12 @@ discard block |
||
81 | 81 | |
82 | 82 | public function getCacheDir() |
83 | 83 | { |
84 | - return sys_get_temp_dir() . '/' . Kernel::VERSION . '/' . $this->testCase . '/cache/' . $this->environment; |
|
84 | + return sys_get_temp_dir().'/'.Kernel::VERSION.'/'.$this->testCase.'/cache/'.$this->environment; |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | public function getLogDir() |
88 | 88 | { |
89 | - return sys_get_temp_dir() . '/' . Kernel::VERSION . '/' . $this->testCase . '/logs'; |
|
89 | + return sys_get_temp_dir().'/'.Kernel::VERSION.'/'.$this->testCase.'/logs'; |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | public function registerContainerConfiguration(LoaderInterface $loader) |