@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | InputOption::VALUE_OPTIONAL, |
87 | 87 | 'Output Format. One of [' . implode(',', RendererFactory::getFormats()) . ']' |
88 | 88 | ) |
89 | - ->setHelp($help);; |
|
89 | + ->setHelp($help); ; |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | /** |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | ) |
137 | 137 | ) |
138 | 138 | ); |
139 | - $tables = $resolvedTables[0]; |
|
139 | + $tables = $resolvedTables[0]; |
|
140 | 140 | } else { |
141 | 141 | $tables = $this->dbHelper->getTables(); |
142 | 142 | } |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | return array(array( |
198 | 198 | 'table' => $tableName, |
199 | 199 | 'operation' => 'ENGINE ' . $engine, |
200 | - 'type' => sprintf('%15s rows', (string)$affectedRows), |
|
200 | + 'type' => sprintf('%15s rows', (string) $affectedRows), |
|
201 | 201 | 'status' => sprintf('%.3f secs', microtime(true) - $start), |
202 | 202 | ) |
203 | 203 | ); |
@@ -98,7 +98,7 @@ |
||
98 | 98 | $this->_allVariables['Handler_read_first'] + |
99 | 99 | $this->_allVariables['Handler_read_next'] + $this->_allVariables['Handler_read_key'] + |
100 | 100 | $this->_allVariables['Handler_read_prev'])); |
101 | - $rows[] = array( |
|
101 | + $rows[] = array( |
|
102 | 102 | 'Full table scans', |
103 | 103 | sprintf('%.2f', $tableScanRate * 100) . '%', |
104 | 104 | $this->formatDesc('HINT: "Handler_read_rnd_next" is reset to zero when reached the value of 2^32 (4G).') |
@@ -72,7 +72,7 @@ |
||
72 | 72 | 'max_write_lock_count' => 1, |
73 | 73 | 'slave_max_allowed_packet' => 1, |
74 | 74 | ); |
75 | - $isSize = false !== strpos($name, '_size'); |
|
75 | + $isSize = false !== strpos($name, '_size'); |
|
76 | 76 | |
77 | 77 | return $isSize || isset($toHuman[$name]); |
78 | 78 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | $this->getCommand()->getHelper('twig')->render($template, $this->config->getArray('twigVars')) |
32 | 32 | ); |
33 | 33 | |
34 | - $this->output->writeln('<info>Created file: <comment>' . $outFile .'<comment></info>'); |
|
34 | + $this->output->writeln('<info>Created file: <comment>' . $outFile . '<comment></info>'); |
|
35 | 35 | } |
36 | 36 | |
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 | { |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | public function execute() |
13 | 13 | { |
14 | 14 | if ($this->config->getBool('isModmanMode')) { |
15 | - $modManDir = $this->config->getString('vendorNamespace') . '_' . $this->config->getString('moduleName'). '/src'; |
|
15 | + $modManDir = $this->config->getString('vendorNamespace') . '_' . $this->config->getString('moduleName') . '/src'; |
|
16 | 16 | if (file_exists($modManDir)) { |
17 | 17 | throw new \RuntimeException('Module already exists. Stop.'); |
18 | 18 | } |
@@ -32,28 +32,28 @@ discard block |
||
32 | 32 | $this->config->setString('moduleDirectory', $moduleDir); |
33 | 33 | |
34 | 34 | mkdir($moduleDir, 0777, true); |
35 | - $this->output->writeln('<info>Created directory: <comment>' . $moduleDir .'<comment></info>'); |
|
35 | + $this->output->writeln('<info>Created directory: <comment>' . $moduleDir . '<comment></info>'); |
|
36 | 36 | |
37 | 37 | // Add etc folder |
38 | 38 | mkdir($moduleDir . '/etc'); |
39 | - $this->output->writeln('<info>Created directory: <comment>' . $moduleDir .'/etc<comment></info>'); |
|
39 | + $this->output->writeln('<info>Created directory: <comment>' . $moduleDir . '/etc<comment></info>'); |
|
40 | 40 | |
41 | 41 | // Add blocks folder |
42 | 42 | if ($this->config->getBool('shouldAddBlocks')) { |
43 | 43 | mkdir($moduleDir . '/Block'); |
44 | - $this->output->writeln('<info>Created directory: <comment>' . $moduleDir . '/Block' .'<comment></info>'); |
|
44 | + $this->output->writeln('<info>Created directory: <comment>' . $moduleDir . '/Block' . '<comment></info>'); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | // Add helpers folder |
48 | 48 | if ($this->config->getBool('shouldAddHelpers')) { |
49 | 49 | mkdir($moduleDir . '/Helper'); |
50 | - $this->output->writeln('<info>Created directory: <comment>' . $moduleDir . '/Helper' .'<comment></info>'); |
|
50 | + $this->output->writeln('<info>Created directory: <comment>' . $moduleDir . '/Helper' . '<comment></info>'); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | // Add models folder |
54 | 54 | if ($this->config->getBool('shouldAddModels')) { |
55 | 55 | mkdir($moduleDir . '/Model'); |
56 | - $this->output->writeln('<info>Created directory: <comment>' . $moduleDir . '/Model' .'<comment></info>'); |
|
56 | + $this->output->writeln('<info>Created directory: <comment>' . $moduleDir . '/Model' . '<comment></info>'); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | // Create SQL and Data folder |
@@ -28,7 +28,7 @@ |
||
28 | 28 | ) |
29 | 29 | ); |
30 | 30 | |
31 | - $this->output->writeln('<info>Created file: <comment>' . $outFile .'<comment></info>'); |
|
31 | + $this->output->writeln('<info>Created file: <comment>' . $outFile . '<comment></info>'); |
|
32 | 32 | |
33 | 33 | return true; |
34 | 34 | } |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $this->config->getArray('twigVars') |
21 | 21 | ) |
22 | 22 | ); |
23 | - $this->output->writeln('<info>Created file: <comment>' . $setupFolder . '/InstallSchema.php' .'<comment></info>'); |
|
23 | + $this->output->writeln('<info>Created file: <comment>' . $setupFolder . '/InstallSchema.php' . '<comment></info>'); |
|
24 | 24 | |
25 | 25 | \file_put_contents( |
26 | 26 | $setupFolder . '/InstallData.php', |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | $this->config->getArray('twigVars') |
30 | 30 | ) |
31 | 31 | ); |
32 | - $this->output->writeln('<info>Created file: <comment>' . $setupFolder . '/InstallData.php' .'<comment></info>'); |
|
32 | + $this->output->writeln('<info>Created file: <comment>' . $setupFolder . '/InstallData.php' . '<comment></info>'); |
|
33 | 33 | |
34 | 34 | \file_put_contents( |
35 | 35 | $setupFolder . '/UpgradeSchema.php', |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | $this->config->getArray('twigVars') |
39 | 39 | ) |
40 | 40 | ); |
41 | - $this->output->writeln('<info>Created file: <comment>' . $setupFolder . '/UpgradeSchema.php' .'<comment></info>'); |
|
41 | + $this->output->writeln('<info>Created file: <comment>' . $setupFolder . '/UpgradeSchema.php' . '<comment></info>'); |
|
42 | 42 | |
43 | 43 | \file_put_contents( |
44 | 44 | $setupFolder . '/UpgradeData.php', |
@@ -47,6 +47,6 @@ discard block |
||
47 | 47 | $this->config->getArray('twigVars') |
48 | 48 | ) |
49 | 49 | ); |
50 | - $this->output->writeln('<info>Created file: <comment>' . $setupFolder . '/UpgradeData.php' .'<comment></info>'); |
|
50 | + $this->output->writeln('<info>Created file: <comment>' . $setupFolder . '/UpgradeData.php' . '<comment></info>'); |
|
51 | 51 | } |
52 | 52 | } |
@@ -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 | { |
@@ -79,7 +79,7 @@ |
||
79 | 79 | // First index is (probably always) vendor |
80 | 80 | $moduleNameData = explode('_', $moduleName); |
81 | 81 | |
82 | - if (! is_null($vendor) && strtolower($moduleNameData[0]) !== strtolower($vendor)) { |
|
82 | + if (!is_null($vendor) && strtolower($moduleNameData[0]) !== strtolower($vendor)) { |
|
83 | 83 | continue; |
84 | 84 | } |
85 | 85 |
@@ -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']]; |