@@ -74,7 +74,7 @@ |
||
| 74 | 74 | } |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | - usort($table, function ($a, $b) { |
|
| 77 | + usort($table, function($a, $b) { |
|
| 78 | 78 | return strcmp($a['Job'], $b['Job']); |
| 79 | 79 | }); |
| 80 | 80 | |
@@ -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); |
@@ -86,11 +86,11 @@ |
||
| 86 | 86 | |
| 87 | 87 | // If there is no output format highlight the status and show error'd rows at bottom |
| 88 | 88 | if (!$input->getOption('format')) { |
| 89 | - usort($table, function ($a, $b) { |
|
| 89 | + usort($table, function($a, $b) { |
|
| 90 | 90 | return $a['Status'] !== 'OK'; |
| 91 | 91 | }); |
| 92 | 92 | |
| 93 | - array_walk($table, function (&$row) { |
|
| 93 | + array_walk($table, function(&$row) { |
|
| 94 | 94 | $status = $row['Status']; |
| 95 | 95 | $availableStatus = array('OK' => 'info', 'Error' => 'error'); |
| 96 | 96 | $statusString = sprintf( |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | 'Id' => array('ID'), |
| 71 | 71 | 'Name' => array('Code'), |
| 72 | 72 | 'AttributeSetId' => array('Attribute-Set-ID'), |
| 73 | - 'VisibleOnFront' => array('Visible-On-Front', function ($value) { |
|
| 73 | + 'VisibleOnFront' => array('Visible-On-Front', function($value) { |
|
| 74 | 74 | return $value ? 'yes' : 'no'; |
| 75 | 75 | }), |
| 76 | 76 | 'AttributeModel' => array('Attribute-Model'), |
@@ -78,23 +78,23 @@ discard block |
||
| 78 | 78 | 'BackendTable' => array('Backend-Table'), |
| 79 | 79 | 'BackendType' => array('Backend-Type'), |
| 80 | 80 | 'SourceModel' => array('Source-Model'), |
| 81 | - 'CacheIdTags' => array('Cache-ID-Tags', function ($values) { |
|
| 82 | - return implode(',', (array)$values); |
|
| 81 | + 'CacheIdTags' => array('Cache-ID-Tags', function($values) { |
|
| 82 | + return implode(',', (array) $values); |
|
| 83 | 83 | }), |
| 84 | - 'CacheTags' => array('Cache-Tags', function ($values) { |
|
| 85 | - return implode(',', (array)$values); |
|
| 84 | + 'CacheTags' => array('Cache-Tags', function($values) { |
|
| 85 | + return implode(',', (array) $values); |
|
| 86 | 86 | }), |
| 87 | 87 | 'DefaultValue' => array('Default-Value'), |
| 88 | 88 | 'FlatColumns' => array( |
| 89 | 89 | 'Flat-Columns', |
| 90 | - function ($values) { |
|
| 91 | - return implode(',', array_keys((array)$values)); |
|
| 90 | + function($values) { |
|
| 91 | + return implode(',', array_keys((array) $values)); |
|
| 92 | 92 | } |
| 93 | 93 | ), |
| 94 | 94 | 'FlatIndexes' => array( |
| 95 | 95 | 'Flat-Indexes', |
| 96 | - function ($values) { |
|
| 97 | - return implode(',', array_keys((array)$values)); |
|
| 96 | + function($values) { |
|
| 97 | + return implode(',', array_keys((array) $values)); |
|
| 98 | 98 | } |
| 99 | 99 | ) |
| 100 | 100 | ); |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | $selectedFile = $this->getHelper('dialog')->askAndValidate( |
| 61 | 61 | $output, |
| 62 | 62 | $question, |
| 63 | - function ($typeInput) use ($files) { |
|
| 63 | + function($typeInput) use ($files) { |
|
| 64 | 64 | if (!isset($files[$typeInput - 1])) { |
| 65 | 65 | throw new \InvalidArgumentException('Invalid file'); |
| 66 | 66 | } |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | if (isset($parts[1])) { |
| 172 | 172 | $value = $parts[1]; |
| 173 | 173 | } |
| 174 | - $this->scriptVars['${' . $variable. '}'] = $value; |
|
| 174 | + $this->scriptVars['${' . $variable . '}'] = $value; |
|
| 175 | 175 | } |
| 176 | 176 | } |
| 177 | 177 | } |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | $this->scriptVars[$matches[1]] = $dialog->askAndValidate( |
| 236 | 236 | $output, |
| 237 | 237 | '<info>Please enter a value for <comment>' . $matches[1] . '</comment>:</info> ', |
| 238 | - function ($value) { |
|
| 238 | + function($value) { |
|
| 239 | 239 | if ($value == '') { |
| 240 | 240 | throw new \Exception('Please enter a value'); |
| 241 | 241 | } |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | ) |
| 149 | 149 | ) |
| 150 | 150 | ); |
| 151 | - $tables = $resolvedTables[0]; |
|
| 151 | + $tables = $resolvedTables[0]; |
|
| 152 | 152 | } else { |
| 153 | 153 | $tables = $this->dbHelper->getTables(); |
| 154 | 154 | } |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | return array(array( |
| 209 | 209 | 'table' => $tableName, |
| 210 | 210 | 'operation' => 'ENGINE ' . $engine, |
| 211 | - 'type' => sprintf('%15s rows', (string)$affectedRows), |
|
| 211 | + 'type' => sprintf('%15s rows', (string) $affectedRows), |
|
| 212 | 212 | 'status' => sprintf('%.3f secs', microtime(true) - $start), |
| 213 | 213 | ) |
| 214 | 214 | ); |
@@ -55,7 +55,7 @@ discard block |
||
| 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 { |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | public function __construct(array $initConfig = array(), $isPharMode = false, OutputInterface $output = null) |
| 66 | 66 | { |
| 67 | 67 | $this->initConfig = $initConfig; |
| 68 | - $this->isPharMode = (bool)$isPharMode; |
|
| 68 | + $this->isPharMode = (bool) $isPharMode; |
|
| 69 | 69 | $this->output = $output ?: new NullOutput(); |
| 70 | 70 | } |
| 71 | 71 | |