@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | if (!$silent) { |
204 | 204 | $editionString = ($this->_magentoEnterprise ? ' (Enterprise Edition) ' : ''); |
205 | 205 | $output->writeln( |
206 | - '<info>Found Magento '. $editionString . 'in folder "' . $this->_magentoRootFolder . '"</info>' |
|
206 | + '<info>Found Magento ' . $editionString . 'in folder "' . $this->_magentoRootFolder . '"</info>' |
|
207 | 207 | ); |
208 | 208 | } |
209 | 209 | |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | $preferSource = true |
273 | 273 | ) { |
274 | 274 | $dm = $this->getComposerDownloadManager($input, $output); |
275 | - if (! $config instanceof PackageInterface) { |
|
275 | + if (!$config instanceof PackageInterface) { |
|
276 | 276 | $package = $this->createComposerPackageByConfig($config); |
277 | 277 | } else { |
278 | 278 | $package = $config; |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | escapeshellarg($targetFolder), |
317 | 317 | escapeshellarg($package->getSourceReference()) |
318 | 318 | ); |
319 | - $existingTag = shell_exec($command); |
|
319 | + $existingTag = shell_exec($command); |
|
320 | 320 | if ($existingTag === $package->getSourceReference()) { |
321 | 321 | $command = sprintf('cd %s && hg pull', escapeshellarg($targetFolder)); |
322 | 322 | shell_exec($command); |
@@ -34,28 +34,28 @@ |
||
34 | 34 | $config->setString('moduleDirectory', $moduleDir); |
35 | 35 | |
36 | 36 | mkdir($moduleDir, 0777, true); |
37 | - $this->output->writeln('<info>Created directory: <comment>' . $moduleDir .'<comment></info>'); |
|
37 | + $this->output->writeln('<info>Created directory: <comment>' . $moduleDir . '<comment></info>'); |
|
38 | 38 | |
39 | 39 | // Add etc folder |
40 | 40 | mkdir($moduleDir . '/etc'); |
41 | - $this->output->writeln('<info>Created directory: <comment>' . $moduleDir .'/etc<comment></info>'); |
|
41 | + $this->output->writeln('<info>Created directory: <comment>' . $moduleDir . '/etc<comment></info>'); |
|
42 | 42 | |
43 | 43 | // Add blocks folder |
44 | 44 | if ($config->getBool('shouldAddBlocks')) { |
45 | 45 | mkdir($moduleDir . '/Block'); |
46 | - $this->output->writeln('<info>Created directory: <comment>' . $moduleDir . '/Block' .'<comment></info>'); |
|
46 | + $this->output->writeln('<info>Created directory: <comment>' . $moduleDir . '/Block' . '<comment></info>'); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | // Add helpers folder |
50 | 50 | if ($config->getBool('shouldAddHelpers')) { |
51 | 51 | mkdir($moduleDir . '/Helper'); |
52 | - $this->output->writeln('<info>Created directory: <comment>' . $moduleDir . '/Helper' .'<comment></info>'); |
|
52 | + $this->output->writeln('<info>Created directory: <comment>' . $moduleDir . '/Helper' . '<comment></info>'); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | // Add models folder |
56 | 56 | if ($config->getBool('shouldAddModels')) { |
57 | 57 | mkdir($moduleDir . '/Model'); |
58 | - $this->output->writeln('<info>Created directory: <comment>' . $moduleDir . '/Model' .'<comment></info>'); |
|
58 | + $this->output->writeln('<info>Created directory: <comment>' . $moduleDir . '/Model' . '<comment></info>'); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | // Create SQL and Data folder |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | ) |
22 | 22 | ); |
23 | 23 | $this->output->writeln( |
24 | - '<info>Created file: <comment>' . $setupFolder . '/InstallSchema.php' .'<comment></info>' |
|
24 | + '<info>Created file: <comment>' . $setupFolder . '/InstallSchema.php' . '<comment></info>' |
|
25 | 25 | ); |
26 | 26 | |
27 | 27 | \file_put_contents( |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | ) |
33 | 33 | ); |
34 | 34 | $this->output->writeln( |
35 | - '<info>Created file: <comment>' . $setupFolder . '/InstallData.php' .'<comment></info>' |
|
35 | + '<info>Created file: <comment>' . $setupFolder . '/InstallData.php' . '<comment></info>' |
|
36 | 36 | ); |
37 | 37 | |
38 | 38 | \file_put_contents( |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | ) |
44 | 44 | ); |
45 | 45 | $this->output->writeln( |
46 | - '<info>Created file: <comment>' . $setupFolder . '/UpgradeSchema.php' .'<comment></info>' |
|
46 | + '<info>Created file: <comment>' . $setupFolder . '/UpgradeSchema.php' . '<comment></info>' |
|
47 | 47 | ); |
48 | 48 | |
49 | 49 | \file_put_contents( |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | ) |
55 | 55 | ); |
56 | 56 | $this->output->writeln( |
57 | - '<info>Created file: <comment>' . $setupFolder . '/UpgradeData.php' .'<comment></info>' |
|
57 | + '<info>Created file: <comment>' . $setupFolder . '/UpgradeData.php' . '<comment></info>' |
|
58 | 58 | ); |
59 | 59 | } |
60 | 60 | } |
@@ -54,15 +54,15 @@ discard block |
||
54 | 54 | ->get('\Magento\Framework\Filesystem') |
55 | 55 | ->getDirectoryWrite(MaintenanceMode::FLAG_DIR); |
56 | 56 | |
57 | - if (! is_null($input->getOption('off'))) { |
|
58 | - if (! $flagDir->isExist(MaintenanceMode::FLAG_FILENAME)) { |
|
57 | + if (!is_null($input->getOption('off'))) { |
|
58 | + if (!$flagDir->isExist(MaintenanceMode::FLAG_FILENAME)) { |
|
59 | 59 | return $output->writeln(self::ALREADY_DISABLED_MESSAGE); |
60 | 60 | } |
61 | 61 | |
62 | 62 | return $this->handleDisable($flagDir, $output, $input->getOption('off')); |
63 | 63 | } |
64 | 64 | |
65 | - if (! is_null($input->getOption('on'))) { |
|
65 | + if (!is_null($input->getOption('on'))) { |
|
66 | 66 | if ($flagDir->isExist(MaintenanceMode::FLAG_FILENAME)) { |
67 | 67 | return $output->writeln(self::ALREADY_ENABLED_MESSAGE); |
68 | 68 | } |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $flagDir->touch(MaintenanceMode::FLAG_FILENAME); |
112 | 112 | $output->writeln(self::ENABLED_MESSAGE); |
113 | 113 | |
114 | - if (! is_null($onOption)) { |
|
114 | + if (!is_null($onOption)) { |
|
115 | 115 | // Write IPs to exclusion file |
116 | 116 | $flagDir->writeFile(MaintenanceMode::IP_FILENAME, $onOption); |
117 | 117 | $output->writeln(self::WROTE_IP_MESSAGE); |
@@ -27,7 +27,7 @@ |
||
27 | 27 | */ |
28 | 28 | public function restoration() |
29 | 29 | { |
30 | - $callbackStub = function() { |
|
30 | + $callbackStub = function () { |
|
31 | 31 | }; |
32 | 32 | |
33 | 33 | $this->assertTrue(spl_autoload_register($callbackStub)); |
@@ -62,7 +62,7 @@ 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 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $question[] = '<question>Please select an area:</question>'; |
71 | 71 | |
72 | 72 | $area = $this->getHelper('dialog')->askAndValidate($output, $question, function ($areaIndex) { |
73 | - if (! in_array($areaIndex, range(1, count($this->areas)))) { |
|
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']]; |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | $jobConfig = $this->getJobConfig($jobCode); |
50 | 50 | |
51 | - if (empty($jobCode)|| !isset($jobConfig['instance'])) { |
|
51 | + if (empty($jobCode) || !isset($jobConfig['instance'])) { |
|
52 | 52 | throw new \InvalidArgumentException('No job config found!'); |
53 | 53 | } |
54 | 54 | |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | protected function askJobCode(InputInterface $input, OutputInterface $output, $jobs) |
107 | 107 | { |
108 | 108 | foreach ($jobs as $key => $job) { |
109 | - $question[] = '<comment>[' . ($key+1) . ']</comment> ' . $job['Job'] . PHP_EOL; |
|
109 | + $question[] = '<comment>[' . ($key + 1) . ']</comment> ' . $job['Job'] . PHP_EOL; |
|
110 | 110 | } |
111 | 111 | $question[] = '<question>Please select job: </question>' . PHP_EOL; |
112 | 112 |
@@ -49,13 +49,13 @@ discard block |
||
49 | 49 | // If no argument is supplied, we are modifying all targets |
50 | 50 | $types = array_keys($this->getCacheTypes(static::TARGET_IS_ENABLED)); |
51 | 51 | } else { |
52 | - $types = (array) $types; |
|
52 | + $types = (array)$types; |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | // Find out which types simply do not exist or are not affected by modifier |
56 | 56 | $invalidTypes = array_diff($types, array_keys($this->getCacheTypes(!static::TARGET_IS_ENABLED))); |
57 | 57 | |
58 | - if (! empty($invalidTypes)) { |
|
58 | + if (!empty($invalidTypes)) { |
|
59 | 59 | $output->writeln(sprintf(static::INVALID_TYPES_MESSAGE, implode(', ', $invalidTypes))); |
60 | 60 | } |
61 | 61 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | } |
69 | 69 | |
70 | 70 | /** @var $cacheState \Magento\Framework\App\Cache\StateInterface */ |
71 | - $cacheState = $this->getObjectManager()->get('\Magento\Framework\App\Cache\StateInterface'); |
|
71 | + $cacheState = $this->getObjectManager()->get('\Magento\Framework\App\Cache\StateInterface'); |
|
72 | 72 | $touchedTypes = []; |
73 | 73 | |
74 | 74 | try { |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | continue; |
78 | 78 | } |
79 | 79 | |
80 | - $cacheState->setEnabled($type, (bool) static::TARGET_IS_ENABLED); |
|
80 | + $cacheState->setEnabled($type, (bool)static::TARGET_IS_ENABLED); |
|
81 | 81 | $touchedTypes[] = $type; |
82 | 82 | } |
83 | 83 |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | if (!is_null($value) && !is_bool($value)) { |
16 | 16 | throw new \InvalidArgumentException('Type must be of type bool'); |
17 | 17 | } |
18 | - $this->offsetSet($key, (bool) $value); |
|
18 | + $this->offsetSet($key, (bool)$value); |
|
19 | 19 | |
20 | 20 | return $this; |
21 | 21 | } |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | if (!is_null($value) && !is_int($value)) { |
32 | 32 | throw new \InvalidArgumentException('Type must be of type int'); |
33 | 33 | } |
34 | - $this->offsetSet($key, (int) $value); |
|
34 | + $this->offsetSet($key, (int)$value); |
|
35 | 35 | |
36 | 36 | return $this; |
37 | 37 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | if (!is_null($value) && !is_string($value)) { |
48 | 48 | throw new \InvalidArgumentException('Type must be of type string'); |
49 | 49 | } |
50 | - $this->offsetSet($key, (string) $value); |
|
50 | + $this->offsetSet($key, (string)$value); |
|
51 | 51 | |
52 | 52 | return $this; |
53 | 53 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | if (!is_null($value) && !is_float($value)) { |
64 | 64 | throw new \InvalidArgumentException('Type must be of type float'); |
65 | 65 | } |
66 | - $this->offsetSet($key, (float) $value); |
|
66 | + $this->offsetSet($key, (float)$value); |
|
67 | 67 | |
68 | 68 | return $this; |
69 | 69 | } |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | */ |
107 | 107 | public function getBool($key) |
108 | 108 | { |
109 | - return (bool) $this->offsetGet($key); |
|
109 | + return (bool)$this->offsetGet($key); |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | /** |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | */ |
116 | 116 | public function getInt($key) |
117 | 117 | { |
118 | - return (int) $this->offsetGet($key); |
|
118 | + return (int)$this->offsetGet($key); |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | /** |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | */ |
125 | 125 | public function getString($key) |
126 | 126 | { |
127 | - return (string) $this->offsetGet($key); |
|
127 | + return (string)$this->offsetGet($key); |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | /** |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | */ |
134 | 134 | public function getFloat($key) |
135 | 135 | { |
136 | - return (float) $this->offsetGet($key); |
|
136 | + return (float)$this->offsetGet($key); |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | /** |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | */ |
143 | 143 | public function getArray($key) |
144 | 144 | { |
145 | - return (array) $this->offsetGet($key); |
|
145 | + return (array)$this->offsetGet($key); |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | /** |