Completed
Pull Request — develop (#813)
by Robbie
08:16 queued 03:39
created
src/N98/Magento/Command/Developer/Ide/PhpStorm/MetaCommand.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 
122 122
                     if (!$input->getOption('stdout') && count($classMaps[$group]) > 0) {
123 123
                         $output->writeln(
124
-                            '<info>Generated definitions for <comment>' . $group . '</comment> group</info>'
124
+                            '<info>Generated definitions for <comment>'.$group.'</comment> group</info>'
125 125
                         );
126 126
                     }
127 127
                 }
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
         $path = substr($path, 0, -4);
150 150
         $path = strtr($path, '\\', '/');
151 151
 
152
-        return trim($classPrefix . '_' . strtr($path, '/', '_'), '_');
152
+        return trim($classPrefix.'_'.strtr($path, '/', '_'), '_');
153 153
     }
154 154
 
155 155
     /**
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
             array_pop($parts);
169 169
         }
170 170
 
171
-        return rtrim($classPrefix . '/' . implode('_', $parts), '/');
171
+        return rtrim($classPrefix.'/'.implode('_', $parts), '/');
172 172
     }
173 173
 
174 174
     /**
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
         try {
189 189
             return preg_match("/class\s+{$className}/m", $file->getContents());
190 190
         } catch (Exception $e) {
191
-            $output->writeln('<error>File: ' . $file->__toString() . ' | ' . $e->getMessage() . '</error>');
191
+            $output->writeln('<error>File: '.$file->__toString().' | '.$e->getMessage().'</error>');
192 192
             return false;
193 193
         }
194 194
     }
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
             return $classes;
209 209
         }
210 210
 
211
-        $modelAliases = array_keys((array) \Mage::getConfig()->getNode('global/models'));
211
+        $modelAliases = array_keys((array)\Mage::getConfig()->getNode('global/models'));
212 212
         foreach ($modelAliases as $modelAlias) {
213 213
             $resourceHelper = @\Mage::getResourceHelper($modelAlias);
214 214
             if (is_object($resourceHelper)) {
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
                 if (empty($modelDefinition->resourceModel)) {
241 241
                     continue;
242 242
                 }
243
-                $resourceModelNodePath = 'global/models/' . strval($modelDefinition->resourceModel);
243
+                $resourceModelNodePath = 'global/models/'.strval($modelDefinition->resourceModel);
244 244
                 $resourceModelConfig = \Mage::getConfig()->getNode($resourceModelNodePath);
245 245
                 if ($resourceModelConfig) {
246 246
                     $classPrefix = strval($resourceModelConfig->class);
@@ -255,9 +255,9 @@  discard block
 block discarded – undo
255 255
 
256 256
             $classBaseFolder = str_replace('_', '/', $classPrefix);
257 257
             $searchFolders = array(
258
-                \Mage::getBaseDir('code') . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . $classBaseFolder,
259
-                \Mage::getBaseDir('code') . DIRECTORY_SEPARATOR . 'community' . DIRECTORY_SEPARATOR . $classBaseFolder,
260
-                \Mage::getBaseDir('code') . DIRECTORY_SEPARATOR . 'local' . DIRECTORY_SEPARATOR . $classBaseFolder,
258
+                \Mage::getBaseDir('code').DIRECTORY_SEPARATOR.'core'.DIRECTORY_SEPARATOR.$classBaseFolder,
259
+                \Mage::getBaseDir('code').DIRECTORY_SEPARATOR.'community'.DIRECTORY_SEPARATOR.$classBaseFolder,
260
+                \Mage::getBaseDir('code').DIRECTORY_SEPARATOR.'local'.DIRECTORY_SEPARATOR.$classBaseFolder,
261 261
             );
262 262
             foreach ($searchFolders as $key => $folder) {
263 263
                 if (!is_dir($folder)) {
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
                         $classes[$classIdentifier] = $classNameAfterRewrites;
318 318
 
319 319
                         if ($group == 'helpers' && strpos($classIdentifier, '/') === false) {
320
-                            $classes[$classIdentifier . '/data'] = $classNameAfterRewrites;
320
+                            $classes[$classIdentifier.'/data'] = $classNameAfterRewrites;
321 321
                         }
322 322
                     }
323 323
                 }
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
         $map .= "\n";
346 346
         foreach ($this->groupFactories as $group => $methods) {
347 347
             foreach ($methods as $method) {
348
-                $map .= "        " . $method . "('') => [\n";
348
+                $map .= "        ".$method."('') => [\n";
349 349
                 foreach ($classMaps[$group] as $classPrefix => $class) {
350 350
                     $map .= "            '$classPrefix' instanceof \\$class,\n";
351 351
                 }
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
         if ($input->getOption('stdout')) {
360 360
             $output->writeln($map);
361 361
         } else {
362
-            if (\file_put_contents($this->_magentoRootFolder . '/.phpstorm.meta.php', $map)) {
362
+            if (\file_put_contents($this->_magentoRootFolder.'/.phpstorm.meta.php', $map)) {
363 363
                 $output->writeln('<info>File <comment>.phpstorm.meta.php</comment> generated</info>');
364 364
             }
365 365
         }
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
             $group = 'models';
376 376
         }
377 377
 
378
-        $definitions = \Mage::getConfig()->getNode('global/' . $group);
378
+        $definitions = \Mage::getConfig()->getNode('global/'.$group);
379 379
 
380 380
         switch ($group) {
381 381
             case 'blocks':
Please login to merge, or discard this patch.
src/N98/Magento/Command/Developer/Translate/ExportCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
             }
41 41
 
42 42
             $locale = $input->getArgument('locale');
43
-            $output->writeln('Exporting to <info>' . $filename . '</info>');
43
+            $output->writeln('Exporting to <info>'.$filename.'</info>');
44 44
 
45 45
             $parameters = array('locale' => $locale);
46 46
             $sql = "SELECT * FROM core_translate WHERE locale = :locale";
Please login to merge, or discard this patch.
src/N98/Magento/Command/Developer/Theme/DuplicatesCommand.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,10 +52,10 @@  discard block
 block discarded – undo
52 52
             $output->writeln('<error>Magento 2 is currently not supported.</error>');
53 53
         } else {
54 54
             $referenceFiles = $this->getChecksums(
55
-                $this->_magentoRootFolder . '/app/design/frontend/' . $input->getArgument('originalTheme')
55
+                $this->_magentoRootFolder.'/app/design/frontend/'.$input->getArgument('originalTheme')
56 56
             );
57 57
 
58
-            $themeFolder = $this->_magentoRootFolder . '/app/design/frontend/' . $input->getArgument('theme');
58
+            $themeFolder = $this->_magentoRootFolder.'/app/design/frontend/'.$input->getArgument('theme');
59 59
             $themeFiles = $this->getChecksums($themeFolder);
60 60
 
61 61
             $duplicates = array();
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
                 if (isset($referenceFiles[$themeFilename])
64 64
                     && $themeFileChecksum == $referenceFiles[$themeFilename]
65 65
                 ) {
66
-                    $duplicates[] = $themeFolder . '/' . $themeFilename;
66
+                    $duplicates[] = $themeFolder.'/'.$themeFilename;
67 67
                 }
68 68
             }
69 69
 
@@ -114,13 +114,13 @@  discard block
 block discarded – undo
114 114
     {
115 115
         $document = new JUnitXmlDocument();
116 116
         $suite = $document->addTestSuite();
117
-        $suite->setName('n98-magerun: ' . $this->getName());
117
+        $suite->setName('n98-magerun: '.$this->getName());
118 118
         $suite->setTimestamp(new \DateTime());
119 119
         $suite->setTime($duration);
120 120
 
121 121
         $testCase = $suite->addTestCase();
122 122
         $testCase->setName(
123
-            'Magento Duplicate Theme Files: ' . $input->getArgument('theme') . ' | ' .
123
+            'Magento Duplicate Theme Files: '.$input->getArgument('theme').' | '.
124 124
             $input->getArgument('originalTheme')
125 125
         );
126 126
         $testCase->setClassname('ConflictsCommand');
Please login to merge, or discard this patch.
src/N98/Magento/Command/Developer/Theme/InfoCommand.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     protected function _displayTable(OutputInterface $output, \Mage_Core_Model_Store $store)
61 61
     {
62 62
         $this->writeSection(
63
-            $output, 'Current design setting on store: ' . $store->getWebsite()->getCode() . '/' . $store->getCode()
63
+            $output, 'Current design setting on store: '.$store->getWebsite()->getCode().'/'.$store->getCode()
64 64
         );
65 65
         $storeInfoLines = $this->_parse($this->_configNodesWithExceptions, $store, true);
66 66
         $storeInfoLines = array_merge($storeInfoLines, $this->_parse($this->_configNodes, $store));
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         foreach ($nodes as $nodeLabel => $node) {
83 83
             $result[] = array(
84 84
                 $nodeLabel,
85
-                (string) \Mage::getConfig()->getNode(
85
+                (string)\Mage::getConfig()->getNode(
86 86
                     $node,
87 87
                     AbstractMagentoStoreConfigCommand::SCOPE_STORE_VIEW,
88 88
                     $store->getCode()
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
             );
91 91
             if ($withExceptions) {
92 92
                 $result[] = array(
93
-                    $nodeLabel . ' exceptions', $this->_parseException($node, $store)
93
+                    $nodeLabel.' exceptions', $this->_parseException($node, $store)
94 94
                 );
95 95
             }
96 96
         }
@@ -103,8 +103,8 @@  discard block
 block discarded – undo
103 103
      */
104 104
     protected function _parseException($node, \Mage_Core_Model_Store $store)
105 105
     {
106
-        $exception = (string) \Mage::getConfig()->getNode(
107
-            $node . self::THEMES_EXCEPTION,
106
+        $exception = (string)\Mage::getConfig()->getNode(
107
+            $node.self::THEMES_EXCEPTION,
108 108
             AbstractMagentoStoreConfigCommand::SCOPE_STORE_VIEW,
109 109
             $store->getCode()
110 110
         );
@@ -116,8 +116,8 @@  discard block
 block discarded – undo
116 116
         $exceptions = unserialize($exception);
117 117
         $result = array();
118 118
         foreach ($exceptions as $expression) {
119
-            $result[] = 'Matched Expression: ' . $expression['regexp'];
120
-            $result[] = 'Value: ' . $expression['value'];
119
+            $result[] = 'Matched Expression: '.$expression['regexp'];
120
+            $result[] = 'Value: '.$expression['value'];
121 121
         }
122 122
 
123 123
         return implode("\n", $result);
Please login to merge, or discard this patch.
src/N98/Magento/Command/Developer/Theme/ListCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
                 'format',
20 20
                 null,
21 21
                 InputOption::VALUE_OPTIONAL,
22
-                'Output Format. One of [' . implode(',', RendererFactory::getFormats()) . ']'
22
+                'Output Format. One of ['.implode(',', RendererFactory::getFormats()).']'
23 23
             )
24 24
         ;
25 25
     }
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             foreach ($packages as $package => $themes) {
39 39
                 foreach ($themes as $theme) {
40 40
                     $table[] = array(
41
-                        ($package ? $package . '/' : '') . $theme
41
+                        ($package ? $package.'/' : '').$theme
42 42
                     );
43 43
                 }
44 44
             }
Please login to merge, or discard this patch.
src/N98/Magento/Command/Developer/Log/SizeCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
             if ($fileName === null) {
35 35
                 $path = $this->askLogFile($output);
36 36
             } else {
37
-                $path = $this->getLogDir() . DIRECTORY_SEPARATOR . $fileName;
37
+                $path = $this->getLogDir().DIRECTORY_SEPARATOR.$fileName;
38 38
             }
39 39
 
40 40
             if ($this->logfileExists(basename($path))) {
Please login to merge, or discard this patch.
src/N98/Magento/Command/Developer/Log/AbstractLogCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      */
43 43
     protected function getDebugDir()
44 44
     {
45
-        return \Mage::getBaseDir('var') . '/debug';
45
+        return \Mage::getBaseDir('var').'/debug';
46 46
     }
47 47
 
48 48
     /**
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $i = 0;
71 71
         foreach ($logFiles as $logFile) {
72 72
             $files[$i++] = $logFile->getPathname();
73
-            $question[] = '<comment>[' . ($i) . ']</comment> ' . $logFile->getFilename() . PHP_EOL;
73
+            $question[] = '<comment>['.($i).']</comment> '.$logFile->getFilename().PHP_EOL;
74 74
         }
75 75
         $question[] = '<question>Please select a log file: </question>';
76 76
 
Please login to merge, or discard this patch.
src/N98/Magento/Command/Developer/Log/DbCommand.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      */
24 24
     protected function _getVarienAdapterPhpFile()
25 25
     {
26
-        return $this->_magentoRootFolder . '/lib/Varien/Db/Adapter/Pdo/Mysql.php';
26
+        return $this->_magentoRootFolder.'/lib/Varien/Db/Adapter/Pdo/Mysql.php';
27 27
     }
28 28
 
29 29
     /**
@@ -37,12 +37,12 @@  discard block
 block discarded – undo
37 37
         $this->detectMagento($output);
38 38
         $this->initMagento();
39 39
 
40
-        $output->writeln("<info>Looking in " . $this->_getVarienAdapterPhpFile() . "</info>");
40
+        $output->writeln("<info>Looking in ".$this->_getVarienAdapterPhpFile()."</info>");
41 41
 
42 42
         $this->_replaceVariable($input, $output, '$_debug');
43 43
         $this->_replaceVariable($input, $output, '$_logAllQueries');
44 44
 
45
-        $output->writeln("<info>Done. You can tail <comment>" . $this->_getDebugLogFilename() . "</comment></info>");
45
+        $output->writeln("<info>Done. You can tail <comment>".$this->_getDebugLogFilename()."</comment></info>");
46 46
     }
47 47
 
48 48
     /**
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $varienAdapterPhpFile = $this->_getVarienAdapterPhpFile();
67 67
         $contents = file_get_contents($varienAdapterPhpFile);
68 68
 
69
-        $debugLinePattern = "/protected\\s" . '\\' . $variable . "\\s*?=\\s(false|true)/m";
69
+        $debugLinePattern = "/protected\\s".'\\'.$variable."\\s*?=\\s(false|true)/m";
70 70
         preg_match($debugLinePattern, $contents, $matches);
71 71
         if (!isset($matches[1])) {
72 72
             throw new RuntimeException("Problem finding the \$_debug parameter");
@@ -82,10 +82,10 @@  discard block
 block discarded – undo
82 82
         }
83 83
 
84 84
         $output->writeln(
85
-            "<info>Changed <comment>" . $variable . "</comment> to <comment>" . $newValue . "</comment></info>"
85
+            "<info>Changed <comment>".$variable."</comment> to <comment>".$newValue."</comment></info>"
86 86
         );
87 87
 
88
-        $contents = preg_replace($debugLinePattern, "protected " . $variable . " = " . $newValue, $contents);
88
+        $contents = preg_replace($debugLinePattern, "protected ".$variable." = ".$newValue, $contents);
89 89
         file_put_contents($varienAdapterPhpFile, $contents);
90 90
     }
91 91
 }
Please login to merge, or discard this patch.
src/N98/Magento/Command/Developer/Setup/Script/AttributeCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,9 +56,9 @@
 block discarded – undo
56 56
             $code = $generator->generateCode();
57 57
             $warnings = $generator->getWarnings();
58 58
 
59
-            $output->writeln(implode(PHP_EOL, $warnings) . PHP_EOL . $code);
59
+            $output->writeln(implode(PHP_EOL, $warnings).PHP_EOL.$code);
60 60
         } catch (Exception $e) {
61
-            $output->writeln('<error>' . $e->getMessage() . '</error>');
61
+            $output->writeln('<error>'.$e->getMessage().'</error>');
62 62
         }
63 63
     }
64 64
 
Please login to merge, or discard this patch.