@@ -49,7 +49,7 @@ |
||
| 49 | 49 | 'status' => 1, |
| 50 | 50 | 'is_redeemable' => 1, |
| 51 | 51 | 'website_id' => $input->getOption('website') |
| 52 | - ? : $this->getObjectManager()->get('Magento\Store\Model\StoreManager')->getWebsite(true)->getId(), |
|
| 52 | + ?: $this->getObjectManager()->get('Magento\Store\Model\StoreManager')->getWebsite(true)->getId(), |
|
| 53 | 53 | 'balance' => $input->getArgument('amount'), |
| 54 | 54 | 'date_expires' => $input->getOption('expires') |
| 55 | 55 | ) |
@@ -319,7 +319,7 @@ |
||
| 319 | 319 | * @TODO Move logic into "EventSubscriber" |
| 320 | 320 | * |
| 321 | 321 | * @param OutputInterface $output |
| 322 | - * @return bool |
|
| 322 | + * @return null|false |
|
| 323 | 323 | */ |
| 324 | 324 | public function checkVarDir(OutputInterface $output) |
| 325 | 325 | { |
@@ -20,7 +20,6 @@ |
||
| 20 | 20 | use Symfony\Component\Console\Input\InputInterface; |
| 21 | 21 | use Symfony\Component\Console\Input\InputOption; |
| 22 | 22 | use Symfony\Component\Console\Output\ConsoleOutput; |
| 23 | -use Symfony\Component\Console\Output\NullOutput; |
|
| 24 | 23 | use Symfony\Component\Console\Output\OutputInterface; |
| 25 | 24 | use Symfony\Component\EventDispatcher\EventDispatcher; |
| 26 | 25 | use UnexpectedValueException; |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | * |
| 71 | 71 | * @param StoreManager $storeManager |
| 72 | 72 | * @param Category $sitemapCategoryCollection |
| 73 | - * @param Product $sitmapProductCollection |
|
| 73 | + * @param Product $sitemapProductCollection |
|
| 74 | 74 | * @param Page $sitemapPageCollection |
| 75 | 75 | */ |
| 76 | 76 | public function inject( |
@@ -146,7 +146,6 @@ discard block |
||
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | /** |
| 149 | - * @param string $resourceModel |
|
| 150 | 149 | * @param string $linkBaseUrl |
| 151 | 150 | * @param string $storeId |
| 152 | 151 | * @param array $urls |
@@ -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 |
@@ -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); |
@@ -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 { |
@@ -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)); |
@@ -79,22 +79,22 @@ |
||
| 79 | 79 | 'BackendType' => array('Backend-Type'), |
| 80 | 80 | 'SourceModel' => array('Source-Model'), |
| 81 | 81 | 'CacheIdTags' => array('Cache-ID-Tags', function ($values) { |
| 82 | - return implode(',', (array)$values); |
|
| 82 | + return implode(',', (array) $values); |
|
| 83 | 83 | }), |
| 84 | 84 | 'CacheTags' => array('Cache-Tags', function ($values) { |
| 85 | - return implode(',', (array)$values); |
|
| 85 | + return implode(',', (array) $values); |
|
| 86 | 86 | }), |
| 87 | 87 | 'DefaultValue' => array('Default-Value'), |
| 88 | 88 | 'FlatColumns' => array( |
| 89 | 89 | 'Flat-Columns', |
| 90 | 90 | function ($values) { |
| 91 | - return implode(',', array_keys((array)$values)); |
|
| 91 | + return implode(',', array_keys((array) $values)); |
|
| 92 | 92 | } |
| 93 | 93 | ), |
| 94 | 94 | 'FlatIndexes' => array( |
| 95 | 95 | 'Flat-Indexes', |
| 96 | 96 | function ($values) { |
| 97 | - return implode(',', array_keys((array)$values)); |
|
| 97 | + return implode(',', array_keys((array) $values)); |
|
| 98 | 98 | } |
| 99 | 99 | ) |
| 100 | 100 | ); |