Completed
Pull Request — develop (#813)
by Robbie
08:16 queued 03:39
created
src/N98/Magento/Command/System/Check/Settings/BaseUrlCheckAbstract.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
     public function initConfigPaths()
22 22
     {
23
-        $this->registerStoreConfigPath('baseUrl', 'web/' . $this->class . '/base_url');
23
+        $this->registerStoreConfigPath('baseUrl', 'web/'.$this->class.'/base_url');
24 24
     }
25 25
 
26 26
     /**
@@ -33,17 +33,17 @@  discard block
 block discarded – undo
33 33
         $errorMessage = 'Wrong hostname configured. <info>Hostname must contain a dot</info>';
34 34
 
35 35
         $host    = parse_url($baseUrl, PHP_URL_HOST);
36
-        $isValid = (bool) strstr($host, '.');
36
+        $isValid = (bool)strstr($host, '.');
37 37
         $result->setStatus($isValid);
38 38
         if ($isValid) {
39 39
             $result->setMessage(
40
-                '<info>' . ucfirst($this->class) . ' BaseURL: <comment>' . $baseUrl . '</comment> of Store: <comment>' .
41
-                $store->getCode() . '</comment> - OK'
40
+                '<info>'.ucfirst($this->class).' BaseURL: <comment>'.$baseUrl.'</comment> of Store: <comment>'.
41
+                $store->getCode().'</comment> - OK'
42 42
             );
43 43
         } else {
44 44
             $result->setMessage(
45
-                '<error>Invalid ' . ucfirst($this->class) . ' BaseURL: <comment>' . $baseUrl .
46
-                '</comment> of Store: <comment>' . $store->getCode() . '</comment> ' . $errorMessage . '</error>'
45
+                '<error>Invalid '.ucfirst($this->class).' BaseURL: <comment>'.$baseUrl.
46
+                '</comment> of Store: <comment>'.$store->getCode().'</comment> '.$errorMessage.'</error>'
47 47
             );
48 48
         }
49 49
     }
Please login to merge, or discard this patch.
src/N98/Magento/Command/System/Check/PHP/BytecodeCacheExtensionsCheck.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@
 block discarded – undo
36 36
             $result->setMessage("<info>Bytecode Cache <comment>$bytecodeCacheExtension</comment> found.</info>");
37 37
         } else {
38 38
             $result->setMessage(
39
-                "<error>No Bytecode-Cache found!</error> <comment>It's recommended to install anyone of " .
40
-                implode(', ', $bytecopdeCacheExtensions) . ".</comment>"
39
+                "<error>No Bytecode-Cache found!</error> <comment>It's recommended to install anyone of ".
40
+                implode(', ', $bytecopdeCacheExtensions).".</comment>"
41 41
             );
42 42
         }
43 43
     }
Please login to merge, or discard this patch.
N98/Magento/Command/System/Check/Security/LocalConfigAccessableCheck.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,13 +20,13 @@
 block discarded – undo
20 20
     {
21 21
         $result = $results->createResult();
22 22
         $filePath = 'app/etc/local.xml';
23
-        $defaultUnsecureBaseURL = (string) \Mage::getConfig()->getNode(
24
-            'default/' . \Mage_Core_Model_Store::XML_PATH_UNSECURE_BASE_URL
23
+        $defaultUnsecureBaseURL = (string)\Mage::getConfig()->getNode(
24
+            'default/'.\Mage_Core_Model_Store::XML_PATH_UNSECURE_BASE_URL
25 25
         );
26 26
 
27 27
         $http = new \Varien_Http_Adapter_Curl();
28 28
         $http->setConfig(array('timeout' => $this->_verificationTimeOut));
29
-        $http->write(\Zend_Http_Client::POST, $defaultUnsecureBaseURL . $filePath);
29
+        $http->write(\Zend_Http_Client::POST, $defaultUnsecureBaseURL.$filePath);
30 30
         $responseBody = $http->read();
31 31
         $responseCode = \Zend_Http_Response::extractCode($responseBody);
32 32
         $http->close();
Please login to merge, or discard this patch.
src/N98/Magento/Command/System/Cron/HistoryCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
                 'format',
31 31
                 null,
32 32
                 InputOption::VALUE_OPTIONAL,
33
-                'Output Format. One of [' . implode(',', RendererFactory::getFormats()) . ']'
33
+                'Output Format. One of ['.implode(',', RendererFactory::getFormats()).']'
34 34
             )
35 35
         ;
36 36
     }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         $timezone = $input->getOption('timezone')
54 54
             ? $input->getOption('timezone') : \Mage::app()->getStore()->getConfig('general/locale/timezone');
55 55
 
56
-        $output->writeln('<info>Times shown in <comment>' . $timezone . '</comment></info>');
56
+        $output->writeln('<info>Times shown in <comment>'.$timezone.'</comment></info>');
57 57
 
58 58
         $date       = \Mage::getSingleton('core/date');
59 59
         $offset     = $date->calculateOffset($timezone);
Please login to merge, or discard this patch.
src/N98/Magento/Command/System/Cron/RunCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
             $runConfig = $jobConfig->run;
62 62
 
63 63
             if ($runConfig->model) {
64
-                if (!preg_match(self::REGEX_RUN_MODEL, (string) $runConfig->model, $run)) {
64
+                if (!preg_match(self::REGEX_RUN_MODEL, (string)$runConfig->model, $run)) {
65 65
                     throw new RuntimeException('Invalid model/method definition, expecting "model/class::method".');
66 66
                 }
67 67
                 if (!($model = \Mage::getModel($run[1])) || !method_exists($model, $run[2])) {
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
                 }
70 70
                 $callback = array($model, $run[2]);
71 71
 
72
-                $output->write('<info>Run </info><comment>' . get_class($model) . '::' . $run[2] . '</comment> ');
72
+                $output->write('<info>Run </info><comment>'.get_class($model).'::'.$run[2].'</comment> ');
73 73
 
74 74
                 \Mage::getConfig()->init()->loadEventObservers('crontab');
75 75
                 \Mage::app()->addEventArea('crontab');
@@ -118,9 +118,9 @@  discard block
 block discarded – undo
118 118
         $question = array();
119 119
 
120 120
         foreach ($jobs as $key => $job) {
121
-            $question[] = '<comment>[' . ($index++) . ']</comment> ' . $job['Job'] . PHP_EOL;
121
+            $question[] = '<comment>['.($index++).']</comment> '.$job['Job'].PHP_EOL;
122 122
         }
123
-        $question[] = '<question>Please select job: </question>' . PHP_EOL;
123
+        $question[] = '<question>Please select job: </question>'.PHP_EOL;
124 124
 
125 125
         /** @var $dialogHelper DialogHelper */
126 126
         $dialogHelper = $this->getHelperSet()->get('dialog');
Please login to merge, or discard this patch.
src/N98/Magento/Command/System/InfoCommand.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
                 'format',
33 33
                 null,
34 34
                 InputOption::VALUE_OPTIONAL,
35
-                'Output Format. One of [' . implode(',', RendererFactory::getFormats()) . ']'
35
+                'Output Format. One of ['.implode(',', RendererFactory::getFormats()).']'
36 36
             )
37 37
         ;
38 38
     }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
                 $this->categoryCount();
78 78
                 $this->productCount();
79 79
             } catch (Exception $e) {
80
-                $output->writeln('<error>' . $e->getMessage() . '</error>');
80
+                $output->writeln('<error>'.$e->getMessage().'</error>');
81 81
             }
82 82
         }
83 83
 
@@ -90,9 +90,9 @@  discard block
 block discarded – undo
90 90
             $settingArgument = strtolower($settingArgument);
91 91
             $this->infos = array_change_key_case($this->infos, CASE_LOWER);
92 92
             if (!isset($this->infos[$settingArgument])) {
93
-                throw new InvalidArgumentException('Unknown key: ' . $settingArgument);
93
+                throw new InvalidArgumentException('Unknown key: '.$settingArgument);
94 94
             }
95
-            $output->writeln((string) $this->infos[$settingArgument]);
95
+            $output->writeln((string)$this->infos[$settingArgument]);
96 96
         } else {
97 97
             $this->getHelper('table')
98 98
                 ->setHeaders(array('name', 'value'))
@@ -120,10 +120,10 @@  discard block
 block discarded – undo
120 120
     protected function findCoreOverwrites()
121 121
     {
122 122
         $folders = array(
123
-            $this->_magentoRootFolder . '/app/code/local/Mage',
124
-            $this->_magentoRootFolder . '/app/code/local/Enterprise',
125
-            $this->_magentoRootFolder . '/app/code/community/Mage',
126
-            $this->_magentoRootFolder . '/app/code/community/Enterprise',
123
+            $this->_magentoRootFolder.'/app/code/local/Mage',
124
+            $this->_magentoRootFolder.'/app/code/local/Enterprise',
125
+            $this->_magentoRootFolder.'/app/code/community/Mage',
126
+            $this->_magentoRootFolder.'/app/code/community/Enterprise',
127 127
         );
128 128
         foreach ($folders as $key => $folder) {
129 129
             if (!is_dir($folder)) {
@@ -147,12 +147,12 @@  discard block
 block discarded – undo
147 147
     protected function findVendors()
148 148
     {
149 149
         $codePools = array(
150
-            'core'      => $this->_magentoRootFolder . '/app/code/core/',
151
-            'community' => $this->_magentoRootFolder . '/app/code/community/',
150
+            'core'      => $this->_magentoRootFolder.'/app/code/core/',
151
+            'community' => $this->_magentoRootFolder.'/app/code/community/',
152 152
         );
153 153
 
154
-        if (is_dir($this->_magentoRootFolder . '/app/code/local/')) {
155
-            $codePools['local'] = $this->_magentoRootFolder . '/app/code/local/';
154
+        if (is_dir($this->_magentoRootFolder.'/app/code/local/')) {
155
+            $codePools['local'] = $this->_magentoRootFolder.'/app/code/local/';
156 156
         }
157 157
 
158 158
         foreach ($codePools as $codePool => $codePoolDir) {
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
                 $vendors
173 173
             );
174 174
 
175
-            $this->infos['Vendors (' . $codePool . ')'] = implode(', ', $vendors);
175
+            $this->infos['Vendors ('.$codePool.')'] = implode(', ', $vendors);
176 176
         }
177 177
     }
178 178
 
Please login to merge, or discard this patch.
src/N98/Magento/Command/System/Setup/RunCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
         foreach ($trace as $row) {
99 99
             $rows[] = array(
100 100
                 $i++,
101
-                $row['file'] . ':' . $row['line'],
102
-                $row['class'] . '::' . $row['function']
101
+                $row['file'].':'.$row['line'],
102
+                $row['class'].'::'.$row['function']
103 103
             );
104 104
         }
105 105
         $table->setHeaders(array('#', 'File/Line', 'Method'));
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      */
115 115
     protected function printException(OutputInterface $output, $e)
116 116
     {
117
-        $output->writeln('<error>' . $e->getMessage() . '</error>');
117
+        $output->writeln('<error>'.$e->getMessage().'</error>');
118 118
     }
119 119
 
120 120
     /**
Please login to merge, or discard this patch.
src/N98/Magento/Command/System/Setup/CompareVersionsCommand.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
                 'format',
28 28
                 null,
29 29
                 InputOption::VALUE_OPTIONAL,
30
-                'Output Format. One of [' . implode(',', RendererFactory::getFormats()) . ']'
30
+                'Output Format. One of ['.implode(',', RendererFactory::getFormats()).']'
31 31
             )
32 32
             ->setDescription('Compare module version with core_resource table.');
33 33
         $help = <<<HELP
@@ -62,11 +62,11 @@  discard block
 block discarded – undo
62 62
             $errorCounter = 0;
63 63
             $table = array();
64 64
             foreach ($setups as $setupName => $setup) {
65
-                $moduleName     = (string) $setup->setup->module;
66
-                $moduleVersion  = (string) $modules->{$moduleName}->version;
67
-                $dbVersion      = (string) $resourceModel->getDbVersion($setupName);
65
+                $moduleName     = (string)$setup->setup->module;
66
+                $moduleVersion  = (string)$modules->{$moduleName}->version;
67
+                $dbVersion      = (string)$resourceModel->getDbVersion($setupName);
68 68
                 if (!$ignoreDataUpdate) {
69
-                    $dataVersion = (string) $resourceModel->getDataVersion($setupName);
69
+                    $dataVersion = (string)$resourceModel->getDataVersion($setupName);
70 70
                 }
71 71
                 $ok = $dbVersion == $moduleVersion;
72 72
                 if ($ok && !$ignoreDataUpdate) {
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
     {
172 172
         $document = new JUnitXmlDocument();
173 173
         $suite = $document->addTestSuite();
174
-        $suite->setName('n98-magerun: ' . $this->getName());
174
+        $suite->setName('n98-magerun: '.$this->getName());
175 175
         $suite->setTimestamp(new \DateTime());
176 176
         $suite->setTime($duration);
177 177
 
Please login to merge, or discard this patch.
src/N98/Magento/Command/System/Setup/IncrementalCommand.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
             ->setDescription('List new setup scripts to run, then runs one script')
57 57
             ->addOption('stop-on-error', null, InputOption::VALUE_NONE, 'Stops execution of script on error')
58 58
             ->setHelp(
59
-                'Examines an un-cached configuration tree and determines which ' .
59
+                'Examines an un-cached configuration tree and determines which '.
60 60
                 'structure and data setup resource scripts need to run, and then runs them.'
61 61
             );
62 62
     }
@@ -310,12 +310,12 @@  discard block
 block discarded – undo
310 310
             $output->writeln(
311 311
                 array(
312 312
                     '+--------------------------------------------------+',
313
-                    'Resource Name:             ' . $name,
314
-                    'For Module:                ' . $moduleConfig->getName(),
315
-                    'Class:                     ' . get_class($setupResource),
316
-                    'Current Structure Version: ' . $dbVersion,
317
-                    'Current Data Version:      ' . $dbDataVersion,
318
-                    'Configured Version:        ' . $configVersion
313
+                    'Resource Name:             '.$name,
314
+                    'For Module:                '.$moduleConfig->getName(),
315
+                    'Class:                     '.get_class($setupResource),
316
+                    'Current Structure Version: '.$dbVersion,
317
+                    'Current Data Version:      '.$dbDataVersion,
318
+                    'Configured Version:        '.$configVersion
319 319
                 )
320 320
             );
321 321
 
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
             return;
357 357
         }
358 358
         foreach ($files as $file) {
359
-            $output->writeln(str_replace(\Mage::getBaseDir() . '/', '', $file['fileName']));
359
+            $output->writeln(str_replace(\Mage::getBaseDir().'/', '', $file['fileName']));
360 360
         }
361 361
     }
362 362
 
@@ -386,11 +386,11 @@  discard block
 block discarded – undo
386 386
     {
387 387
         $output = $this->_output;
388 388
         if (!in_array($type, array(self::TYPE_MIGRATION_STRUCTURE, self::TYPE_MIGRATION_DATA))) {
389
-            throw new RuntimeException('Invalid Type [' . $type . ']: structure, data is valid');
389
+            throw new RuntimeException('Invalid Type ['.$type.']: structure, data is valid');
390 390
         }
391 391
 
392 392
         if (!array_key_Exists($name, $needsUpdate)) {
393
-            $output->writeln('<error>No updates to run for ' . $name . ', skipping </error>');
393
+            $output->writeln('<error>No updates to run for '.$name.', skipping </error>');
394 394
 
395 395
             return;
396 396
         }
@@ -407,17 +407,17 @@  discard block
 block discarded – undo
407 407
         }
408 408
         //recreate our specific node in <global><resources></resource></global>
409 409
         //allows for theoretical multiple runs
410
-        $setupResourceConfig = $this->_secondConfig->getNode('global/resources/' . $name);
410
+        $setupResourceConfig = $this->_secondConfig->getNode('global/resources/'.$name);
411 411
         $moduleName = $setupResourceConfig->setup->module;
412 412
         $className = $setupResourceConfig->setup->class;
413 413
 
414
-        $specificResource = $realConfig->getNode('global/resources/' . $name);
414
+        $specificResource = $realConfig->getNode('global/resources/'.$name);
415 415
         $setup = $specificResource->addChild('setup');
416 416
         if ($moduleName) {
417 417
             $setup->addChild('module', $moduleName);
418 418
         } else {
419 419
             $output->writeln(
420
-                '<error>No module node configured for ' . $name . ', possible configuration error </error>'
420
+                '<error>No module node configured for '.$name.', possible configuration error </error>'
421 421
             );
422 422
         }
423 423
 
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
     protected function _runStructureOrDataScripts($toUpdate, array $needsUpdate, $type)
521 521
     {
522 522
         $output = $this->_output;
523
-        $output->writeln('The next ' . $type . ' update to run is <info>' . $toUpdate . '</info>');
523
+        $output->writeln('The next '.$type.' update to run is <info>'.$toUpdate.'</info>');
524 524
         $this->getHelper('dialog')->askAndValidate(
525 525
             $output,
526 526
             '<question>Press Enter to Run this update: </question>'
@@ -530,8 +530,8 @@  discard block
 block discarded – undo
530 530
         $this->_runNamedSetupResource($toUpdate, $needsUpdate, $type);
531 531
         $time_ran = microtime(true) - $start;
532 532
         $output->writeln('');
533
-        $output->writeln(ucwords($type) . ' update <info>' . $toUpdate . '</info> complete.');
534
-        $output->writeln('Ran in ' . floor($time_ran * 1000) . 'ms');
533
+        $output->writeln(ucwords($type).' update <info>'.$toUpdate.'</info> complete.');
534
+        $output->writeln('Ran in '.floor($time_ran * 1000).'ms');
535 535
     }
536 536
 
537 537
     /**
@@ -590,10 +590,10 @@  discard block
 block discarded – undo
590 590
         $needsUpdate = $this->_getAllSetupResourceObjectThatNeedUpdates($setupResources);
591 591
 
592 592
         $output->writeln(
593
-            'Found <info>' . count($setupResources) . '</info> configured setup resource(s)</info>'
593
+            'Found <info>'.count($setupResources).'</info> configured setup resource(s)</info>'
594 594
         );
595 595
         $output->writeln(
596
-            'Found <info>' . count($needsUpdate) . '</info> setup resource(s) which need an update</info>'
596
+            'Found <info>'.count($needsUpdate).'</info> setup resource(s) which need an update</info>'
597 597
         );
598 598
 
599 599
         return $needsUpdate;
Please login to merge, or discard this patch.