@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace N98\Util\Console\Helper; |
| 4 | 4 | |
| 5 | 5 | use N98\Magento\Application; |
| 6 | -use N98\Util\BinaryString; |
|
| 7 | 6 | use RuntimeException; |
| 8 | 7 | use Symfony\Component\Console\Helper\Helper as AbstractHelper; |
| 9 | 8 | use Symfony\Component\Console\Input\ArgvInput; |
@@ -9,7 +9,6 @@ |
||
| 9 | 9 | use Symfony\Component\Console\Helper\Helper as AbstractHelper; |
| 10 | 10 | use Symfony\Component\Console\Output\OutputInterface; |
| 11 | 11 | use Symfony\Component\Console\Input\InputInterface; |
| 12 | -use Symfony\Component\Console\Output\Output; |
|
| 13 | 12 | use Symfony\Component\Translation\Translator; |
| 14 | 13 | use Symfony\Component\Validator\Constraint; |
| 15 | 14 | use Symfony\Component\Validator\Validator; |
@@ -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); |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | $collection->addFieldToFilter( |
| 64 | 64 | 'scope', |
| 65 | 65 | array( |
| 66 | - 'eq' => $scopeId |
|
| 66 | + 'eq' => $scopeId |
|
| 67 | 67 | ) |
| 68 | 68 | ); |
| 69 | 69 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | $this->_collection->addFieldToFilter( |
| 81 | 81 | 'scope', |
| 82 | 82 | array( |
| 83 | - 'eq' => $scopeId |
|
| 83 | + 'eq' => $scopeId |
|
| 84 | 84 | ) |
| 85 | 85 | ); |
| 86 | 86 | } |
@@ -190,9 +190,9 @@ discard block |
||
| 190 | 190 | foreach ($table as $row) { |
| 191 | 191 | $value = str_replace(array("\n", "\r"), array('\n', '\r'), $row['value']); |
| 192 | 192 | $line = 'config:set ' . $row['path'] |
| 193 | - . ' --scope-id=' . $row['scope_id'] |
|
| 194 | - . ' --scope=' . $row['scope'] |
|
| 195 | - . ' ' . escapeshellarg($value); |
|
| 193 | + . ' --scope-id=' . $row['scope_id'] |
|
| 194 | + . ' --scope=' . $row['scope'] |
|
| 195 | + . ' ' . escapeshellarg($value); |
|
| 196 | 196 | $output->writeln($line); |
| 197 | 197 | } |
| 198 | 198 | } |
@@ -162,32 +162,32 @@ |
||
| 162 | 162 | protected function addProductCount() |
| 163 | 163 | { |
| 164 | 164 | $this->infos['Product Count'] = $this->productFactory |
| 165 | - ->create() |
|
| 166 | - ->getCollection() |
|
| 167 | - ->getSize(); |
|
| 165 | + ->create() |
|
| 166 | + ->getCollection() |
|
| 167 | + ->getSize(); |
|
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | protected function addCustomerCount() |
| 171 | 171 | { |
| 172 | 172 | $this->infos['Customer Count'] = $this->customerFactory->create() |
| 173 | - ->getCollection() |
|
| 174 | - ->getSize(); |
|
| 173 | + ->getCollection() |
|
| 174 | + ->getSize(); |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | protected function addCategoryCount() |
| 178 | 178 | { |
| 179 | 179 | $this->infos['Category Count'] = $this->categoryFactory |
| 180 | - ->create() |
|
| 181 | - ->getCollection() |
|
| 182 | - ->getSize(); |
|
| 180 | + ->create() |
|
| 181 | + ->getCollection() |
|
| 182 | + ->getSize(); |
|
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | protected function addAttributeCount() |
| 186 | 186 | { |
| 187 | 187 | $this->infos['Attribute Count'] = $this->attributeFactory |
| 188 | - ->create() |
|
| 189 | - ->getCollection() |
|
| 190 | - ->getSize(); |
|
| 188 | + ->create() |
|
| 189 | + ->getCollection() |
|
| 190 | + ->getSize(); |
|
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | protected function addCacheInfos() |
@@ -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 | } |
@@ -44,10 +44,10 @@ |
||
| 44 | 44 | protected function replaceHtaccessFile($baseUrl) |
| 45 | 45 | { |
| 46 | 46 | $htaccessFile = $this->config->getString('installationFolder') |
| 47 | - . DIRECTORY_SEPARATOR |
|
| 48 | - . 'pub' |
|
| 49 | - . DIRECTORY_SEPARATOR |
|
| 50 | - . '.htaccess'; |
|
| 47 | + . DIRECTORY_SEPARATOR |
|
| 48 | + . 'pub' |
|
| 49 | + . DIRECTORY_SEPARATOR |
|
| 50 | + . '.htaccess'; |
|
| 51 | 51 | |
| 52 | 52 | $this->_backupOriginalFile($htaccessFile); |
| 53 | 53 | $this->_replaceContent($htaccessFile, $baseUrl); |
@@ -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 | } |