Completed
Push — analysis-zGPgQ2 ( 3b9df4 )
by Steven
02:50
created
src/Magestead/Command/Cache/StatusCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
     protected function configure()
20 20
     {
21
-        $this->_projectPath = getcwd();
21
+        $this->_projectPath=getcwd();
22 22
         $this->setName('cache:status');
23 23
         $this->setDescription('Checks cache status');
24 24
     }
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
     {
34 34
         $output->writeln('<info>Checking cache status</info>');
35 35
 
36
-        $command = $this->getCommand(new Config($output));
37
-        $pCommand = "vagrant ssh -c '".$command."'";
36
+        $command=$this->getCommand(new Config($output));
37
+        $pCommand="vagrant ssh -c '".$command."'";
38 38
 
39 39
         return new ProcessCommand($pCommand, $this->_projectPath, $output);
40 40
     }
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      */
47 47
     protected function getCommand(Config $config)
48 48
     {
49
-        $type = $config->type;
49
+        $type=$config->type;
50 50
         switch ($type) {
51 51
             case 'magento':
52 52
                 return 'cd /var/www/public;../bin/n98-magerun.phar cache:list';
Please login to merge, or discard this patch.
src/Magestead/Command/Cache/FlushCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
     protected function configure()
20 20
     {
21
-        $this->_projectPath = getcwd();
21
+        $this->_projectPath=getcwd();
22 22
         $this->setName('cache:flush');
23 23
         $this->setDescription('Flushes cache storage used by cache types');
24 24
     }
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
     {
34 34
         $output->writeln('<info>Flushing cache storage</info>');
35 35
 
36
-        $command = $this->getCommand(new Config($output));
37
-        $pCommand = "vagrant ssh -c '".$command."'";
36
+        $command=$this->getCommand(new Config($output));
37
+        $pCommand="vagrant ssh -c '".$command."'";
38 38
 
39 39
         return new ProcessCommand($pCommand, $this->_projectPath, $output);
40 40
     }
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      */
47 47
     protected function getCommand(Config $config)
48 48
     {
49
-        $type = $config->type;
49
+        $type=$config->type;
50 50
         switch ($type) {
51 51
             case 'magento':
52 52
                 return 'cd /var/www/public;../bin/n98-magerun.phar cache:flush';
Please login to merge, or discard this patch.
src/Magestead/Command/Cache/DisableCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
     protected function configure()
20 20
     {
21
-        $this->_projectPath = getcwd();
21
+        $this->_projectPath=getcwd();
22 22
         $this->setName('cache:disable');
23 23
         $this->setDescription('Disable cache types');
24 24
     }
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
     {
34 34
         $output->writeln('<info>Disabling all cache types</info>');
35 35
 
36
-        $command = $this->getCommand(new Config($output));
37
-        $pCommand = "vagrant ssh -c '".$command."'";
36
+        $command=$this->getCommand(new Config($output));
37
+        $pCommand="vagrant ssh -c '".$command."'";
38 38
 
39 39
         return new ProcessCommand($pCommand, $this->_projectPath, $output);
40 40
     }
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      */
47 47
     protected function getCommand(Config $config)
48 48
     {
49
-        $type = $config->type;
49
+        $type=$config->type;
50 50
         switch ($type) {
51 51
             case 'magento':
52 52
                 return 'cd /var/www/public;../bin/n98-magerun.phar cache:disable';
Please login to merge, or discard this patch.
src/Magestead/Command/Cache/CleanCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
     protected function configure()
20 20
     {
21
-        $this->_projectPath = getcwd();
21
+        $this->_projectPath=getcwd();
22 22
         $this->setName('cache:clean');
23 23
         $this->setDescription('Cleans cache types');
24 24
     }
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
     {
34 34
         $output->writeln('<info>Cleaning all cache types</info>');
35 35
 
36
-        $command = $this->getCommand(new Config($output));
37
-        $pCommand = "vagrant ssh -c '".$command."'";
36
+        $command=$this->getCommand(new Config($output));
37
+        $pCommand="vagrant ssh -c '".$command."'";
38 38
 
39 39
         return new ProcessCommand($pCommand, $this->_projectPath, $output);
40 40
     }
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      */
47 47
     protected function getCommand(Config $config)
48 48
     {
49
-        $type = $config->type;
49
+        $type=$config->type;
50 50
         switch ($type) {
51 51
             case 'magento':
52 52
                 return 'cd /var/www/public;../bin/n98-magerun.phar cache:clean';
Please login to merge, or discard this patch.
src/Magestead/Command/Cache/EnableCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
     protected function configure()
20 20
     {
21
-        $this->_projectPath = getcwd();
21
+        $this->_projectPath=getcwd();
22 22
         $this->setName('cache:enable');
23 23
         $this->setDescription('Enable cache types');
24 24
     }
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
     {
34 34
         $output->writeln('<info>Enabling all cache types</info>');
35 35
 
36
-        $command = $this->getCommand(new Config($output));
37
-        $pCommand = "vagrant ssh -c '".$command."'";
36
+        $command=$this->getCommand(new Config($output));
37
+        $pCommand="vagrant ssh -c '".$command."'";
38 38
 
39 39
         return new ProcessCommand($pCommand, $this->_projectPath, $output);
40 40
     }
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      */
47 47
     protected function getCommand(Config $config)
48 48
     {
49
-        $type = $config->type;
49
+        $type=$config->type;
50 50
         switch ($type) {
51 51
             case 'magento':
52 52
                 return 'cd /var/www/public;../bin/n98-magerun.phar cache:enable';
Please login to merge, or discard this patch.
src/Magestead/Command/BehatCommand.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
     protected function configure()
19 19
     {
20
-        $this->_projectPath = getcwd();
20
+        $this->_projectPath=getcwd();
21 21
 
22 22
         $this->setName('behat');
23 23
         $this->setDescription('Run Behat against your project');
@@ -32,14 +32,14 @@  discard block
 block discarded – undo
32 32
      */
33 33
     protected function execute(InputInterface $input, OutputInterface $output)
34 34
     {
35
-        $option = $input->getArgument('option');
36
-        $command = $this->getCommand(new Config($output), $option);
35
+        $option=$input->getArgument('option');
36
+        $command=$this->getCommand(new Config($output), $option);
37 37
         if (!$command) {
38 38
             return $output->writeln('<error>Command not available for this application</error>');
39 39
         }
40 40
 
41 41
         $output->writeln('<info>Running Behat</info>');
42
-        $passedCommand = "vagrant ssh -c '".$command."'";
42
+        $passedCommand="vagrant ssh -c '".$command."'";
43 43
         passthru($passedCommand);
44 44
     }
45 45
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      */
52 52
     protected function getCommand(Config $config, $option)
53 53
     {
54
-        $type = $config->type;
54
+        $type=$config->type;
55 55
         switch ($type) {
56 56
             case 'magento':
57 57
                 return "cd /var/www;bin/behat $option";
Please login to merge, or discard this patch.
src/Magestead/Command/NewCommand.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
 
27 27
     protected function configure()
28 28
     {
29
-        $this->_basePath = dirname(__FILE__).'/../../../';
30
-        $this->_projectPath = getcwd();
29
+        $this->_basePath=dirname(__FILE__).'/../../../';
30
+        $this->_projectPath=getcwd();
31 31
 
32 32
         $this->setName('new');
33 33
         $this->setDescription('Initialise new Magestead project into current working directory');
@@ -44,10 +44,10 @@  discard block
 block discarded – undo
44 44
      */
45 45
     protected function execute(InputInterface $input, OutputInterface $output)
46 46
     {
47
-        $project = $this->setProject($input);
47
+        $project=$this->setProject($input);
48 48
 
49
-        $helper = $this->getHelper('question');
50
-        $options = new Options($helper, $input, $output, $project);
49
+        $helper=$this->getHelper('question');
50
+        $options=new Options($helper, $input, $output, $project);
51 51
 
52 52
         $this->setupProject($output, $options);
53 53
 
@@ -65,10 +65,10 @@  discard block
 block discarded – undo
65 65
     protected function copyConfigFiles($source, $target, OutputInterface $output)
66 66
     {
67 67
         try {
68
-            $progress = new ProgressBar($output, 3720);
68
+            $progress=new ProgressBar($output, 3720);
69 69
             $progress->start();
70 70
             foreach (
71
-                $iterator = new \RecursiveIteratorIterator(
71
+                $iterator=new \RecursiveIteratorIterator(
72 72
                     new \RecursiveDirectoryIterator($source, \RecursiveDirectoryIterator::SKIP_DOTS),
73 73
                     \RecursiveIteratorIterator::SELF_FIRST) as $item
74 74
             ) {
@@ -92,24 +92,24 @@  discard block
 block discarded – undo
92 92
      */
93 93
     protected function configureProject(array $options, OutputInterface $output)
94 94
     {
95
-        $msConfig = $this->getConfigFile($output);
95
+        $msConfig=$this->getConfigFile($output);
96 96
 
97
-        $app = ($options['app'] == 'magento2') ? 'magento2' : 'magento';
98
-        $hostname = 'magestead-'.$options['base_url'];
97
+        $app=($options['app'] == 'magento2') ? 'magento2' : 'magento';
98
+        $hostname='magestead-'.$options['base_url'];
99 99
 
100
-        $msConfig['vagrantfile']['vm']['box'] = $options['box'];
101
-        $msConfig['vagrantfile']['vm']['box_url'] = $options['box'];
102
-        $msConfig['vagrantfile']['vm']['hostname'] = $hostname;
103
-        $msConfig['vagrantfile']['vm']['memory'] = $options['memory_limit'];
104
-        $msConfig['vagrantfile']['vm']['network']['private_network'] = $options['ip_address'];
105
-        $msConfig['magestead']['apps']['mba_12345']['type'] = $app;
106
-        $msConfig['magestead']['apps']['mba_12345']['locale'] = $options['locale'];
107
-        $msConfig['magestead']['apps']['mba_12345']['default_currency'] = $options['default_currency'];
108
-        $msConfig['magestead']['apps']['mba_12345']['base_url'] = $options['base_url'];
109
-        $msConfig['magestead']['os'] = $options['os'];
110
-        $msConfig['magestead']['server'] = $options['server'];
100
+        $msConfig['vagrantfile']['vm']['box']=$options['box'];
101
+        $msConfig['vagrantfile']['vm']['box_url']=$options['box'];
102
+        $msConfig['vagrantfile']['vm']['hostname']=$hostname;
103
+        $msConfig['vagrantfile']['vm']['memory']=$options['memory_limit'];
104
+        $msConfig['vagrantfile']['vm']['network']['private_network']=$options['ip_address'];
105
+        $msConfig['magestead']['apps']['mba_12345']['type']=$app;
106
+        $msConfig['magestead']['apps']['mba_12345']['locale']=$options['locale'];
107
+        $msConfig['magestead']['apps']['mba_12345']['default_currency']=$options['default_currency'];
108
+        $msConfig['magestead']['apps']['mba_12345']['base_url']=$options['base_url'];
109
+        $msConfig['magestead']['os']=$options['os'];
110
+        $msConfig['magestead']['server']=$options['server'];
111 111
 
112
-        $this->_msConfig = $msConfig;
112
+        $this->_msConfig=$msConfig;
113 113
 
114 114
         $this->saveConfigFile($msConfig, $output);
115 115
     }
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      */
122 122
     protected function getConfigFile(OutputInterface $output)
123 123
     {
124
-        $yaml = new Parser();
124
+        $yaml=new Parser();
125 125
         try {
126 126
             return $yaml->parse(file_get_contents($this->_projectPath.'/magestead.yaml'));
127 127
         } catch (ParseException $e) {
@@ -136,8 +136,8 @@  discard block
 block discarded – undo
136 136
      */
137 137
     protected function saveConfigFile(array $config, OutputInterface $output)
138 138
     {
139
-        $dumper = new Dumper();
140
-        $yaml = $dumper->dump($config, 6);
139
+        $dumper=new Dumper();
140
+        $yaml=$dumper->dump($config, 6);
141 141
 
142 142
         try {
143 143
             file_put_contents($this->_projectPath.'/magestead.yaml', $yaml);
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
     protected function setupProject(OutputInterface $output, $options)
154 154
     {
155 155
         $output->writeln('<info>Setting up project structure</info>');
156
-        $provisionFolder = $this->_basePath.'provision';
156
+        $provisionFolder=$this->_basePath.'provision';
157 157
         $this->copyConfigFiles($provisionFolder, $this->_projectPath, $output);
158 158
         $this->configureProject($options->getAllOptions(), $output);
159 159
 
@@ -169,8 +169,8 @@  discard block
 block discarded – undo
169 169
      */
170 170
     protected function setProject(InputInterface $input)
171 171
     {
172
-        $project = $input->getArgument('project');
173
-        $this->_projectPath = $this->_projectPath.'/'.$project;
172
+        $project=$input->getArgument('project');
173
+        $this->_projectPath=$this->_projectPath.'/'.$project;
174 174
 
175 175
         if (is_dir($this->_projectPath)) {
176 176
             throw new ExistingProjectException('Target project directory already exists');
Please login to merge, or discard this patch.
src/Magestead/Command/Log/StreamCommand.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      */
23 23
     protected function configure()
24 24
     {
25
-        $this->_projectPath = getcwd();
25
+        $this->_projectPath=getcwd();
26 26
         $this->setName('log:stream');
27 27
         $this->setDescription('Stream a specific server log');
28 28
         $this->addArgument('log', InputArgument::REQUIRED, 'access or error');
@@ -36,15 +36,15 @@  discard block
 block discarded – undo
36 36
      */
37 37
     protected function execute(InputInterface $input, OutputInterface $output)
38 38
     {
39
-        $log = $input->getArgument('log');
39
+        $log=$input->getArgument('log');
40 40
 
41 41
         $output->writeln('<info>Streaming '.ucwords($log).' Log</info>');
42
-        $command = $this->getCommand(new Config($output), $log);
42
+        $command=$this->getCommand(new Config($output), $log);
43 43
         if (!$command) {
44 44
             return $output->writeln('<error>Command not available for this application</error>');
45 45
         }
46 46
 
47
-        $pCommand = "vagrant ssh -c '".$command."'";
47
+        $pCommand="vagrant ssh -c '".$command."'";
48 48
 
49 49
         return new ProcessCommand($pCommand, $this->_projectPath, $output);
50 50
     }
@@ -57,11 +57,11 @@  discard block
 block discarded – undo
57 57
      */
58 58
     private function getCommand(Config $config, $log)
59 59
     {
60
-        $server = $config->_config['magestead']['server'];
61
-        $os = $config->_config['magestead']['os'];
60
+        $server=$config->_config['magestead']['server'];
61
+        $os=$config->_config['magestead']['os'];
62 62
 
63
-        $location = $this->getLogLocation($server, $os);
64
-        $command = 'tail -f /var/log/'.$location.'/'.$config->base_url.'-'.$log.'.log';
63
+        $location=$this->getLogLocation($server, $os);
64
+        $command='tail -f /var/log/'.$location.'/'.$config->base_url.'-'.$log.'.log';
65 65
 
66 66
         return $command;
67 67
     }
@@ -74,9 +74,9 @@  discard block
 block discarded – undo
74 74
      */
75 75
     private function getLogLocation($server, $os)
76 76
     {
77
-        $location = 'nginx';
77
+        $location='nginx';
78 78
         if ($server != 'nginx') {
79
-            $location = ($os == 'ubuntu14') ? 'apache2' : 'httpd';
79
+            $location=($os == 'ubuntu14') ? 'apache2' : 'httpd';
80 80
         }
81 81
 
82 82
         return $location;
Please login to merge, or discard this patch.
src/Magestead/Command/Log/ViewCommand.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      */
23 23
     protected function configure()
24 24
     {
25
-        $this->_projectPath = getcwd();
25
+        $this->_projectPath=getcwd();
26 26
         $this->setName('log:view');
27 27
         $this->setDescription('View a specific server log');
28 28
         $this->addArgument('log', InputArgument::REQUIRED, 'access or error');
@@ -36,15 +36,15 @@  discard block
 block discarded – undo
36 36
      */
37 37
     protected function execute(InputInterface $input, OutputInterface $output)
38 38
     {
39
-        $log = $input->getArgument('log');
39
+        $log=$input->getArgument('log');
40 40
 
41 41
         $output->writeln('<info>Viewing '.ucwords($log).' Log</info>');
42
-        $command = $this->getCommand(new Config($output), $log);
42
+        $command=$this->getCommand(new Config($output), $log);
43 43
         if (!$command) {
44 44
             return $output->writeln('<error>Command not available for this application</error>');
45 45
         }
46 46
 
47
-        $pCommand = "vagrant ssh -c '".$command."'";
47
+        $pCommand="vagrant ssh -c '".$command."'";
48 48
 
49 49
         return new ProcessCommand($pCommand, $this->_projectPath, $output);
50 50
     }
@@ -57,11 +57,11 @@  discard block
 block discarded – undo
57 57
      */
58 58
     private function getCommand(Config $config, $log)
59 59
     {
60
-        $server = $config->_config['magestead']['server'];
61
-        $os = $config->_config['magestead']['os'];
60
+        $server=$config->_config['magestead']['server'];
61
+        $os=$config->_config['magestead']['os'];
62 62
 
63
-        $location = $this->getLogLocation($server, $os);
64
-        $command = 'cat /var/log/'.$location.'/'.$config->base_url.'-'.$log.'.log';
63
+        $location=$this->getLogLocation($server, $os);
64
+        $command='cat /var/log/'.$location.'/'.$config->base_url.'-'.$log.'.log';
65 65
 
66 66
         return $command;
67 67
     }
@@ -74,9 +74,9 @@  discard block
 block discarded – undo
74 74
      */
75 75
     private function getLogLocation($server, $os)
76 76
     {
77
-        $location = 'nginx';
77
+        $location='nginx';
78 78
         if ($server != 'nginx') {
79
-            $location = ($os == 'ubuntu14') ? 'apache2' : 'httpd';
79
+            $location=($os == 'ubuntu14') ? 'apache2' : 'httpd';
80 80
         }
81 81
 
82 82
         return $location;
Please login to merge, or discard this patch.