@@ -89,8 +89,8 @@ discard block |
||
89 | 89 | } |
90 | 90 | |
91 | 91 | $observerConfig = $this->getObjectManager() |
92 | - ->get('\Magento\Framework\Event\Config\Reader') |
|
93 | - ->read($area); |
|
92 | + ->get('\Magento\Framework\Event\Config\Reader') |
|
93 | + ->read($area); |
|
94 | 94 | |
95 | 95 | if (true === $input->getOption('sort')) { |
96 | 96 | /** |
@@ -125,8 +125,8 @@ discard block |
||
125 | 125 | |
126 | 126 | // @todo Output is a bit ugly!? |
127 | 127 | $this->getHelper('table') |
128 | - ->setHeaders(['Event', 'Observer name', 'Fires']) |
|
129 | - ->setRows($table) |
|
130 | - ->renderByFormat($output, $table, $input->getOption('format')); |
|
128 | + ->setHeaders(['Event', 'Observer name', 'Fires']) |
|
129 | + ->setRows($table) |
|
130 | + ->renderByFormat($output, $table, $input->getOption('format')); |
|
131 | 131 | } |
132 | 132 | } |
@@ -62,15 +62,15 @@ discard block |
||
62 | 62 | $area = $input->getArgument('area'); |
63 | 63 | $eventFilter = $input->getArgument('event'); |
64 | 64 | |
65 | - if (is_null($area) || ! in_array($area, $this->areas)) { |
|
65 | + if (is_null($area) || !in_array($area, $this->areas)) { |
|
66 | 66 | foreach ($this->areas as $key => $area) { |
67 | 67 | $question[] = '<comment>[' . ($key + 1) . ']</comment> ' . $area . PHP_EOL; |
68 | 68 | } |
69 | 69 | |
70 | 70 | $question[] = '<question>Please select an area:</question>'; |
71 | 71 | |
72 | - $area = $this->getHelper('dialog')->askAndValidate($output, $question, function ($areaIndex) { |
|
73 | - if (! in_array($areaIndex, range(1, count($this->areas)))) { |
|
72 | + $area = $this->getHelper('dialog')->askAndValidate($output, $question, function($areaIndex) { |
|
73 | + if (!in_array($areaIndex, range(1, count($this->areas)))) { |
|
74 | 74 | throw new \InvalidArgumentException('Invalid selection.'); |
75 | 75 | } |
76 | 76 | |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | if ($input->getOption('format') === null) { |
82 | 82 | $sectionHeader = 'Observers in [' . $area . '] area'; |
83 | 83 | |
84 | - if (! is_null($eventFilter)) { |
|
84 | + if (!is_null($eventFilter)) { |
|
85 | 85 | $sectionHeader .= ' registered for [' . $eventFilter . '] event'; |
86 | 86 | } |
87 | 87 | |
@@ -109,13 +109,13 @@ discard block |
||
109 | 109 | foreach ($observerConfig as $eventName => $observers) { |
110 | 110 | $firstObserver = true; |
111 | 111 | |
112 | - if (! is_null($eventFilter) && $eventName != $eventFilter) { |
|
112 | + if (!is_null($eventFilter) && $eventName != $eventFilter) { |
|
113 | 113 | continue; |
114 | 114 | } |
115 | 115 | |
116 | 116 | foreach ($observers as $observerName => $observerData) { |
117 | 117 | if ($firstObserver) { |
118 | - $firstObserver = ! $firstObserver; |
|
118 | + $firstObserver = !$firstObserver; |
|
119 | 119 | $table[] = [$eventName, $observerName, $observerData['instance'] . '::' . $observerData['name']]; |
120 | 120 | } else { |
121 | 121 | $table[] = ['', $observerName, $observerData['instance'] . '::' . $observerData['name']]; |
@@ -18,16 +18,16 @@ discard block |
||
18 | 18 | |
19 | 19 | protected function configure() |
20 | 20 | { |
21 | - $this |
|
22 | - ->setName('dev:theme:list') |
|
23 | - ->setDescription('Lists all available themes') |
|
24 | - ->addOption( |
|
25 | - 'format', |
|
26 | - null, |
|
27 | - InputOption::VALUE_OPTIONAL, |
|
28 | - 'Output Format. One of [' . implode(',', RendererFactory::getFormats()) . ']' |
|
29 | - ) |
|
30 | - ; |
|
21 | + $this |
|
22 | + ->setName('dev:theme:list') |
|
23 | + ->setDescription('Lists all available themes') |
|
24 | + ->addOption( |
|
25 | + 'format', |
|
26 | + null, |
|
27 | + InputOption::VALUE_OPTIONAL, |
|
28 | + 'Output Format. One of [' . implode(',', RendererFactory::getFormats()) . ']' |
|
29 | + ) |
|
30 | + ; |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | /** |
@@ -38,11 +38,11 @@ discard block |
||
38 | 38 | $this->themeCollection = $themeCollection; |
39 | 39 | } |
40 | 40 | |
41 | - /** |
|
42 | - * @param \Symfony\Component\Console\Input\InputInterface $input |
|
43 | - * @param \Symfony\Component\Console\Output\OutputInterface $output |
|
44 | - * @return int|void |
|
45 | - */ |
|
41 | + /** |
|
42 | + * @param \Symfony\Component\Console\Input\InputInterface $input |
|
43 | + * @param \Symfony\Component\Console\Output\OutputInterface $output |
|
44 | + * @return int|void |
|
45 | + */ |
|
46 | 46 | protected function execute(InputInterface $input, OutputInterface $output) |
47 | 47 | { |
48 | 48 | $this->detectMagento($output); |
@@ -13,18 +13,18 @@ |
||
13 | 13 | { |
14 | 14 | protected function configure() |
15 | 15 | { |
16 | - $this |
|
17 | - ->setName('generation:flush') |
|
18 | - ->setDescription('Flushs generated code like factories and proxies') |
|
19 | - ->addArgument('vendorName', InputArgument::OPTIONAL, 'Vendor to remove like "Magento"') |
|
20 | - ; |
|
16 | + $this |
|
17 | + ->setName('generation:flush') |
|
18 | + ->setDescription('Flushs generated code like factories and proxies') |
|
19 | + ->addArgument('vendorName', InputArgument::OPTIONAL, 'Vendor to remove like "Magento"') |
|
20 | + ; |
|
21 | 21 | } |
22 | 22 | |
23 | - /** |
|
24 | - * @param \Symfony\Component\Console\Input\InputInterface $input |
|
25 | - * @param \Symfony\Component\Console\Output\OutputInterface $output |
|
26 | - * @return int|void |
|
27 | - */ |
|
23 | + /** |
|
24 | + * @param \Symfony\Component\Console\Input\InputInterface $input |
|
25 | + * @param \Symfony\Component\Console\Output\OutputInterface $output |
|
26 | + * @return int|void |
|
27 | + */ |
|
28 | 28 | protected function execute(InputInterface $input, OutputInterface $output) |
29 | 29 | { |
30 | 30 | $this->detectMagento($output); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | $validateInstallationFolder = function($folderName) use ($input) { |
16 | 16 | $folderName = rtrim(trim($folderName, ' '), '/'); |
17 | 17 | if (substr($folderName, 0, 1) == '.') { |
18 | - $cwd = \getcwd() ; |
|
18 | + $cwd = \getcwd(); |
|
19 | 19 | if (empty($cwd) && isset($_SERVER['PWD'])) { |
20 | 20 | $cwd = $_SERVER['PWD']; |
21 | 21 | } |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | } |
28 | 28 | |
29 | 29 | if (!is_dir($folderName)) { |
30 | - if (!@mkdir($folderName,0777, true)) { |
|
30 | + if (!@mkdir($folderName, 0777, true)) { |
|
31 | 31 | throw new \InvalidArgumentException('Cannot create folder.'); |
32 | 32 | } |
33 | 33 |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | $process->setTimeout(86400); |
64 | 64 | $process->start(); |
65 | - $process->wait(function ($type, $buffer) { |
|
65 | + $process->wait(function($type, $buffer) { |
|
66 | 66 | $this->output->write($buffer, false, OutputInterface::OUTPUT_RAW); |
67 | 67 | }); |
68 | 68 | |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $this->getCommand() |
125 | 125 | ->getHelperSet() |
126 | 126 | ->get('formatter') |
127 | - ->formatBlock('Authentication', 'bg=blue;fg=white', true), |
|
127 | + ->formatBlock('Authentication', 'bg=blue;fg=white', true), |
|
128 | 128 | '', |
129 | 129 | )); |
130 | 130 | |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | $username = $dialog->askAndValidate( |
138 | 138 | $output, |
139 | 139 | '<comment>Please enter your public key: </comment>', |
140 | - function ($value) { |
|
140 | + function($value) { |
|
141 | 141 | if ('' === trim($value)) { |
142 | 142 | throw new \Exception('The private key (auth token) can not be empty'); |
143 | 143 | } |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $password = $dialog->askHiddenResponseAndValidate( |
153 | 153 | $output, |
154 | 154 | '<comment>Please enter your private key: </comment>', |
155 | - function ($value) { |
|
155 | + function($value) { |
|
156 | 156 | if ('' === trim($value)) { |
157 | 157 | throw new \Exception('The private key (auth token) can not be empty'); |
158 | 158 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | $process->setTimeout(86400); |
29 | 29 | |
30 | 30 | $process->start(); |
31 | - $process->wait(function ($type, $buffer) { |
|
31 | + $process->wait(function($type, $buffer) { |
|
32 | 32 | $this->output->write('composer > ' . $buffer, false); |
33 | 33 | }); |
34 | 34 |
@@ -44,8 +44,8 @@ |
||
44 | 44 | { |
45 | 45 | if (extension_loaded('xdebug') && xdebug_is_enabled() && ini_get('xdebug.max_nesting_level') < 200) { |
46 | 46 | $errorMessage = 'Please change PHP ini setting "xdebug.max_nesting_level". ' |
47 | - . 'Please change it to a value >= 200. ' |
|
48 | - . 'Your current value is ' . ini_get('xdebug.max_nesting_level'); |
|
47 | + . 'Please change it to a value >= 200. ' |
|
48 | + . 'Your current value is ' . ini_get('xdebug.max_nesting_level'); |
|
49 | 49 | throw new \RuntimeException($errorMessage); |
50 | 50 | } |
51 | 51 | } |
@@ -51,7 +51,7 @@ |
||
51 | 51 | * |
52 | 52 | * @param Bootstrap $bootstrap |
53 | 53 | * @param \Exception $exception |
54 | - * @return bool |
|
54 | + * @return boolean|null |
|
55 | 55 | */ |
56 | 56 | public function catchException(Bootstrap $bootstrap, \Exception $exception) |
57 | 57 | { |
@@ -42,7 +42,7 @@ |
||
42 | 42 | } elseif ($this->input->getOption('magentoVersionByName')) { |
43 | 43 | foreach ($this->commandConfig['magento-packages'] as $key => $package) { |
44 | 44 | if ($package['name'] == $this->input->getOption('magentoVersionByName')) { |
45 | - $type = $key+1; |
|
45 | + $type = $key + 1; |
|
46 | 46 | break; |
47 | 47 | } |
48 | 48 | } |
@@ -28,10 +28,10 @@ |
||
28 | 28 | @chmod($varCacheFolder, 0777); |
29 | 29 | |
30 | 30 | $mediaFolder = $installationFolder |
31 | - . DIRECTORY_SEPARATOR |
|
32 | - . 'pub' |
|
33 | - . DIRECTORY_SEPARATOR |
|
34 | - . 'media'; |
|
31 | + . DIRECTORY_SEPARATOR |
|
32 | + . 'pub' |
|
33 | + . DIRECTORY_SEPARATOR |
|
34 | + . 'media'; |
|
35 | 35 | if (!is_dir($mediaFolder)) { |
36 | 36 | @mkdir($mediaFolder); |
37 | 37 | } |
@@ -51,7 +51,7 @@ |
||
51 | 51 | * |
52 | 52 | * @param Bootstrap $bootstrap |
53 | 53 | * @param \Exception $exception |
54 | - * @return bool |
|
54 | + * @return boolean|null |
|
55 | 55 | */ |
56 | 56 | public function catchException(Bootstrap $bootstrap, \Exception $exception) |
57 | 57 | { |