@@ -16,8 +16,7 @@ discard block |
||
16 | 16 | protected $_config; |
17 | 17 | protected $_projectPath; |
18 | 18 | |
19 | - protected function configure() |
|
20 | - { |
|
19 | + protected function configure() { |
|
21 | 20 | $this->_projectPath = getcwd(); |
22 | 21 | $this->setName("index:reindex"); |
23 | 22 | $this->setDescription("Reindex data"); |
@@ -29,8 +28,7 @@ discard block |
||
29 | 28 | * @param OutputInterface $output |
30 | 29 | * @return ProcessCommand |
31 | 30 | */ |
32 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
33 | - { |
|
31 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
34 | 32 | $output->writeln('<info>Reindexing data</info>'); |
35 | 33 | $index = $input->getArgument('index'); |
36 | 34 | |
@@ -44,8 +42,7 @@ discard block |
||
44 | 42 | * @param $index |
45 | 43 | * @return bool|string |
46 | 44 | */ |
47 | - protected function getCommand(Config $config, $index) |
|
48 | - { |
|
45 | + protected function getCommand(Config $config, $index) { |
|
49 | 46 | $type = $config->type; |
50 | 47 | switch ($type) { |
51 | 48 | case 'magento': |
@@ -52,6 +52,6 @@ |
||
52 | 52 | break; |
53 | 53 | } |
54 | 54 | |
55 | - return false; |
|
55 | + return FALSE; |
|
56 | 56 | } |
57 | 57 | } |
58 | 58 | \ No newline at end of file |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | protected function configure() |
20 | 20 | { |
21 | - $this->_projectPath = getcwd(); |
|
21 | + $this->_projectPath=getcwd(); |
|
22 | 22 | $this->setName("index:reindex"); |
23 | 23 | $this->setDescription("Reindex data"); |
24 | 24 | $this->addArgument('index', InputArgument::OPTIONAL, '[indexer]'); |
@@ -32,10 +32,10 @@ discard block |
||
32 | 32 | protected function execute(InputInterface $input, OutputInterface $output) |
33 | 33 | { |
34 | 34 | $output->writeln('<info>Reindexing data</info>'); |
35 | - $index = $input->getArgument('index'); |
|
35 | + $index=$input->getArgument('index'); |
|
36 | 36 | |
37 | - $command = $this->getCommand(new Config($output), $index); |
|
38 | - $pCommand = "vagrant ssh -c '". $command ."'"; |
|
37 | + $command=$this->getCommand(new Config($output), $index); |
|
38 | + $pCommand="vagrant ssh -c '".$command."'"; |
|
39 | 39 | return new ProcessCommand($pCommand, $this->_projectPath, $output); |
40 | 40 | } |
41 | 41 | |
@@ -46,10 +46,10 @@ discard block |
||
46 | 46 | */ |
47 | 47 | protected function getCommand(Config $config, $index) |
48 | 48 | { |
49 | - $type = $config->type; |
|
49 | + $type=$config->type; |
|
50 | 50 | switch ($type) { |
51 | 51 | case 'magento': |
52 | - $index = (!is_null($index)) ? ' '.$index : ':all'; |
|
52 | + $index=(!is_null($index)) ? ' '.$index : ':all'; |
|
53 | 53 | return "cd /var/www/public;../bin/n98-magerun.phar index:reindex$index"; |
54 | 54 | break; |
55 | 55 | case 'magento2': |
@@ -52,6 +52,6 @@ |
||
52 | 52 | break; |
53 | 53 | } |
54 | 54 | |
55 | - return false; |
|
55 | + return FALSE; |
|
56 | 56 | } |
57 | 57 | } |
58 | 58 | \ No newline at end of file |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | |
18 | 18 | protected function configure() |
19 | 19 | { |
20 | - $this->_projectPath = getcwd(); |
|
20 | + $this->_projectPath=getcwd(); |
|
21 | 21 | $this->setName("cache:disable"); |
22 | 22 | $this->setDescription("Disable cache types"); |
23 | 23 | $this->addArgument('type', InputArgument::OPTIONAL, '[cache code/type]'); |
@@ -32,9 +32,9 @@ discard block |
||
32 | 32 | { |
33 | 33 | $output->writeln('<info>Disabling all cache types</info>'); |
34 | 34 | |
35 | - $cacheType = $input->getArgument('type'); |
|
36 | - $command = $this->getCommand(new Config($output), $cacheType); |
|
37 | - $pCommand = "vagrant ssh -c '". $command ."'"; |
|
35 | + $cacheType=$input->getArgument('type'); |
|
36 | + $command=$this->getCommand(new Config($output), $cacheType); |
|
37 | + $pCommand="vagrant ssh -c '".$command."'"; |
|
38 | 38 | return new ProcessCommand($pCommand, $this->_projectPath, $output); |
39 | 39 | } |
40 | 40 | |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | protected function getCommand(Config $config, $cacheType) |
46 | 46 | { |
47 | - $type = $config->type; |
|
47 | + $type=$config->type; |
|
48 | 48 | switch ($type) { |
49 | 49 | case 'magento': |
50 | 50 | return "cd /var/www/public;../bin/n98-magerun.phar cache:disable $cacheType"; |
@@ -15,8 +15,7 @@ discard block |
||
15 | 15 | protected $_config; |
16 | 16 | protected $_projectPath; |
17 | 17 | |
18 | - protected function configure() |
|
19 | - { |
|
18 | + protected function configure() { |
|
20 | 19 | $this->_projectPath = getcwd(); |
21 | 20 | $this->setName("cache:disable"); |
22 | 21 | $this->setDescription("Disable cache types"); |
@@ -28,8 +27,7 @@ discard block |
||
28 | 27 | * @param OutputInterface $output |
29 | 28 | * @return ProcessCommand |
30 | 29 | */ |
31 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
32 | - { |
|
30 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
33 | 31 | $output->writeln('<info>Disabling all cache types</info>'); |
34 | 32 | |
35 | 33 | $cacheType = $input->getArgument('type'); |
@@ -42,8 +40,7 @@ discard block |
||
42 | 40 | * @param Config $config |
43 | 41 | * @return bool|string |
44 | 42 | */ |
45 | - protected function getCommand(Config $config, $cacheType) |
|
46 | - { |
|
43 | + protected function getCommand(Config $config, $cacheType) { |
|
47 | 44 | $type = $config->type; |
48 | 45 | switch ($type) { |
49 | 46 | case 'magento': |
@@ -14,8 +14,7 @@ discard block |
||
14 | 14 | protected $_config; |
15 | 15 | protected $_projectPath; |
16 | 16 | |
17 | - protected function configure() |
|
18 | - { |
|
17 | + protected function configure() { |
|
19 | 18 | $this->_projectPath = getcwd(); |
20 | 19 | $this->setName("redis:flush-all"); |
21 | 20 | $this->setDescription("Flush redis storage"); |
@@ -26,8 +25,7 @@ discard block |
||
26 | 25 | * @param OutputInterface $output |
27 | 26 | * @return ProcessCommand |
28 | 27 | */ |
29 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
30 | - { |
|
28 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
31 | 29 | $output->writeln('<info>Flushing Redis Storage</info>'); |
32 | 30 | |
33 | 31 | $command = "redis-cli flushall"; |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | |
17 | 17 | protected function configure() |
18 | 18 | { |
19 | - $this->_projectPath = getcwd(); |
|
19 | + $this->_projectPath=getcwd(); |
|
20 | 20 | $this->setName("redis:flush-all"); |
21 | 21 | $this->setDescription("Flush redis storage"); |
22 | 22 | } |
@@ -30,8 +30,8 @@ discard block |
||
30 | 30 | { |
31 | 31 | $output->writeln('<info>Flushing Redis Storage</info>'); |
32 | 32 | |
33 | - $command = "redis-cli flushall"; |
|
34 | - $pCommand = "vagrant ssh -c '". $command ."'"; |
|
33 | + $command="redis-cli flushall"; |
|
34 | + $pCommand="vagrant ssh -c '".$command."'"; |
|
35 | 35 | return new ProcessCommand($pCommand, $this->_projectPath, $output); |
36 | 36 | } |
37 | 37 | } |
@@ -16,8 +16,7 @@ discard block |
||
16 | 16 | * @param $projectPath |
17 | 17 | * @param OutputInterface $output |
18 | 18 | */ |
19 | - public function __construct($command, $projectPath, OutputInterface $output) |
|
20 | - { |
|
19 | + public function __construct($command, $projectPath, OutputInterface $output) { |
|
21 | 20 | $this->run($command, $projectPath, $output); |
22 | 21 | } |
23 | 22 | |
@@ -26,8 +25,7 @@ discard block |
||
26 | 25 | * @param $projectPath |
27 | 26 | * @param OutputInterface $output |
28 | 27 | */ |
29 | - protected function run($command, $projectPath, OutputInterface $output) |
|
30 | - { |
|
28 | + protected function run($command, $projectPath, OutputInterface $output) { |
|
31 | 29 | $process = new Process($command, $projectPath, array_merge($_SERVER, $_ENV), null, null); |
32 | 30 | |
33 | 31 | $process->run(function ($type, $line) use ($output) { |
@@ -28,7 +28,7 @@ |
||
28 | 28 | */ |
29 | 29 | protected function run($command, $projectPath, OutputInterface $output) |
30 | 30 | { |
31 | - $process = new Process($command, $projectPath, array_merge($_SERVER, $_ENV), null, null); |
|
31 | + $process = new Process($command, $projectPath, array_merge($_SERVER, $_ENV), NULL, NULL); |
|
32 | 32 | |
33 | 33 | $process->run(function ($type, $line) use ($output) { |
34 | 34 | $output->write($line); |
@@ -28,9 +28,9 @@ |
||
28 | 28 | */ |
29 | 29 | protected function run($command, $projectPath, OutputInterface $output) |
30 | 30 | { |
31 | - $process = new Process($command, $projectPath, array_merge($_SERVER, $_ENV), null, null); |
|
31 | + $process=new Process($command, $projectPath, array_merge($_SERVER, $_ENV), null, null); |
|
32 | 32 | |
33 | - $process->run(function ($type, $line) use ($output) { |
|
33 | + $process->run(function($type, $line) use ($output) { |
|
34 | 34 | $output->write($line); |
35 | 35 | }); |
36 | 36 | } |
@@ -14,8 +14,7 @@ discard block |
||
14 | 14 | { |
15 | 15 | protected $_projectPath; |
16 | 16 | |
17 | - protected function configure() |
|
18 | - { |
|
17 | + protected function configure() { |
|
19 | 18 | $this->_projectPath = getcwd(); |
20 | 19 | |
21 | 20 | $this->setName("behat"); |
@@ -28,8 +27,7 @@ discard block |
||
28 | 27 | * @param OutputInterface $output |
29 | 28 | * @return mixed |
30 | 29 | */ |
31 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
32 | - { |
|
30 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
33 | 31 | $option = $input->getArgument('option'); |
34 | 32 | $command = $this->getCommand(new Config($output), $option); |
35 | 33 | if (!$command) { |
@@ -46,8 +44,7 @@ discard block |
||
46 | 44 | * @param $option |
47 | 45 | * @return bool|string |
48 | 46 | */ |
49 | - protected function getCommand(Config $config, $option) |
|
50 | - { |
|
47 | + protected function getCommand(Config $config, $option) { |
|
51 | 48 | $type = $config->type; |
52 | 49 | switch ($type) { |
53 | 50 | case 'magento': |
@@ -58,6 +58,6 @@ |
||
58 | 58 | break; |
59 | 59 | } |
60 | 60 | |
61 | - return false; |
|
61 | + return FALSE; |
|
62 | 62 | } |
63 | 63 | } |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | |
17 | 17 | protected function configure() |
18 | 18 | { |
19 | - $this->_projectPath = getcwd(); |
|
19 | + $this->_projectPath=getcwd(); |
|
20 | 20 | |
21 | 21 | $this->setName("behat"); |
22 | 22 | $this->setDescription("Run Behat against your project"); |
@@ -30,14 +30,14 @@ discard block |
||
30 | 30 | */ |
31 | 31 | protected function execute(InputInterface $input, OutputInterface $output) |
32 | 32 | { |
33 | - $option = $input->getArgument('option'); |
|
34 | - $command = $this->getCommand(new Config($output), $option); |
|
33 | + $option=$input->getArgument('option'); |
|
34 | + $command=$this->getCommand(new Config($output), $option); |
|
35 | 35 | if (!$command) { |
36 | 36 | return $output->writeln('<error>Command not available for this application</error>'); |
37 | 37 | } |
38 | 38 | |
39 | 39 | $output->writeln('<info>Running Behat</info>'); |
40 | - $passedCommand = "vagrant ssh -c '". $command ."'"; |
|
40 | + $passedCommand="vagrant ssh -c '".$command."'"; |
|
41 | 41 | passthru($passedCommand); |
42 | 42 | } |
43 | 43 | |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | */ |
49 | 49 | protected function getCommand(Config $config, $option) |
50 | 50 | { |
51 | - $type = $config->type; |
|
51 | + $type=$config->type; |
|
52 | 52 | switch ($type) { |
53 | 53 | case 'magento': |
54 | 54 | return "cd /var/www;bin/behat $option"; |
@@ -4,4 +4,6 @@ |
||
4 | 4 | * Class MissingConfigFileException |
5 | 5 | * @package Magestead\Exceptions |
6 | 6 | */ |
7 | -class MissingConfigFileException extends \Exception {} |
|
8 | 7 | \ No newline at end of file |
8 | +class MissingConfigFileException extends \Exception |
|
9 | +{ |
|
10 | +} |
|
9 | 11 | \ No newline at end of file |
@@ -6,12 +6,12 @@ |
||
6 | 6 | $privateKey = "$argv[2]"; |
7 | 7 | |
8 | 8 | $contents = [ |
9 | - "http-basic" => [ |
|
10 | - "repo.magento.com" => [ |
|
11 | - "username" => $publicKey, |
|
12 | - "password" => $privateKey, |
|
13 | - ] |
|
14 | - ] |
|
9 | + "http-basic" => [ |
|
10 | + "repo.magento.com" => [ |
|
11 | + "username" => $publicKey, |
|
12 | + "password" => $privateKey, |
|
13 | + ] |
|
14 | + ] |
|
15 | 15 | ]; |
16 | 16 | |
17 | 17 |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$file = "/home/vagrant/.composer/auth.json"; |
|
3 | +$file="/home/vagrant/.composer/auth.json"; |
|
4 | 4 | |
5 | -$publicKey = "$argv[1]"; |
|
6 | -$privateKey = "$argv[2]"; |
|
5 | +$publicKey="$argv[1]"; |
|
6 | +$privateKey="$argv[2]"; |
|
7 | 7 | |
8 | -$contents = [ |
|
8 | +$contents=[ |
|
9 | 9 | "http-basic" => [ |
10 | 10 | "repo.magento.com" => [ |
11 | 11 | "username" => $publicKey, |
@@ -4,48 +4,48 @@ |
||
4 | 4 | $env = include $file; |
5 | 5 | |
6 | 6 | $env['cache'] = |
7 | - array ( |
|
8 | - 'frontend' => |
|
9 | - array ( |
|
10 | - 'default' => |
|
11 | - array ( |
|
12 | - 'backend' => 'Cm_Cache_Backend_Redis', |
|
13 | - 'backend_options' => |
|
14 | - array ( |
|
15 | - 'server' => '127.0.0.1', |
|
16 | - 'port' => '6379', |
|
17 | - 'persistent' => '', |
|
18 | - 'database' => '0', |
|
19 | - 'force_standalone' => '0', |
|
20 | - 'connect_retries' => '1', |
|
21 | - 'read_timeout' => '10', |
|
22 | - 'automatic_cleaning_factor' => '0', |
|
23 | - 'compress_data' => '1', |
|
24 | - 'compress_tags' => '1', |
|
25 | - 'compress_threshold' => '20480', |
|
26 | - 'compression_lib' => 'gzip', |
|
7 | + array ( |
|
8 | + 'frontend' => |
|
9 | + array ( |
|
10 | + 'default' => |
|
11 | + array ( |
|
12 | + 'backend' => 'Cm_Cache_Backend_Redis', |
|
13 | + 'backend_options' => |
|
14 | + array ( |
|
15 | + 'server' => '127.0.0.1', |
|
16 | + 'port' => '6379', |
|
17 | + 'persistent' => '', |
|
18 | + 'database' => '0', |
|
19 | + 'force_standalone' => '0', |
|
20 | + 'connect_retries' => '1', |
|
21 | + 'read_timeout' => '10', |
|
22 | + 'automatic_cleaning_factor' => '0', |
|
23 | + 'compress_data' => '1', |
|
24 | + 'compress_tags' => '1', |
|
25 | + 'compress_threshold' => '20480', |
|
26 | + 'compression_lib' => 'gzip', |
|
27 | 27 | ) |
28 | - ), |
|
29 | - 'page_cache' => |
|
30 | - array ( |
|
31 | - 'backend' => 'Cm_Cache_Backend_Redis', |
|
32 | - 'backend_options' => |
|
33 | - array ( |
|
34 | - 'server' => '127.0.0.1', |
|
35 | - 'port' => '6379', |
|
36 | - 'persistent' => '', |
|
37 | - 'database' => '1', |
|
38 | - 'force_standalone' => '0', |
|
39 | - 'connect_retries' => '1', |
|
40 | - 'read_timeout' => '10', |
|
41 | - 'automatic_cleaning_factor' => '0', |
|
42 | - 'compress_data' => '0', |
|
43 | - 'compress_tags' => '1', |
|
44 | - 'compress_threshold' => '20480', |
|
45 | - 'compression_lib' => 'gzip', |
|
46 | - ), |
|
47 | - ), |
|
48 | - ) |
|
49 | - ); |
|
28 | + ), |
|
29 | + 'page_cache' => |
|
30 | + array ( |
|
31 | + 'backend' => 'Cm_Cache_Backend_Redis', |
|
32 | + 'backend_options' => |
|
33 | + array ( |
|
34 | + 'server' => '127.0.0.1', |
|
35 | + 'port' => '6379', |
|
36 | + 'persistent' => '', |
|
37 | + 'database' => '1', |
|
38 | + 'force_standalone' => '0', |
|
39 | + 'connect_retries' => '1', |
|
40 | + 'read_timeout' => '10', |
|
41 | + 'automatic_cleaning_factor' => '0', |
|
42 | + 'compress_data' => '0', |
|
43 | + 'compress_tags' => '1', |
|
44 | + 'compress_threshold' => '20480', |
|
45 | + 'compression_lib' => 'gzip', |
|
46 | + ), |
|
47 | + ), |
|
48 | + ) |
|
49 | + ); |
|
50 | 50 | |
51 | 51 | file_put_contents($file, "<?php \n \n return ".var_export($env,true).";"); |
@@ -48,4 +48,4 @@ |
||
48 | 48 | ) |
49 | 49 | ); |
50 | 50 | |
51 | -file_put_contents($file, "<?php \n \n return ".var_export($env,true).";"); |
|
51 | +file_put_contents($file, "<?php \n \n return ".var_export($env,TRUE).";"); |
@@ -1,17 +1,17 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$file = "$argv[1]/magento2/app/etc/env.php"; |
|
4 | -$env = include $file; |
|
3 | +$file="$argv[1]/magento2/app/etc/env.php"; |
|
4 | +$env=include $file; |
|
5 | 5 | |
6 | -$env['cache'] = |
|
7 | - array ( |
|
6 | +$env['cache']= |
|
7 | + array( |
|
8 | 8 | 'frontend' => |
9 | - array ( |
|
9 | + array( |
|
10 | 10 | 'default' => |
11 | - array ( |
|
11 | + array( |
|
12 | 12 | 'backend' => 'Cm_Cache_Backend_Redis', |
13 | 13 | 'backend_options' => |
14 | - array ( |
|
14 | + array( |
|
15 | 15 | 'server' => '127.0.0.1', |
16 | 16 | 'port' => '6379', |
17 | 17 | 'persistent' => '', |
@@ -27,10 +27,10 @@ discard block |
||
27 | 27 | ) |
28 | 28 | ), |
29 | 29 | 'page_cache' => |
30 | - array ( |
|
30 | + array( |
|
31 | 31 | 'backend' => 'Cm_Cache_Backend_Redis', |
32 | 32 | 'backend_options' => |
33 | - array ( |
|
33 | + array( |
|
34 | 34 | 'server' => '127.0.0.1', |
35 | 35 | 'port' => '6379', |
36 | 36 | 'persistent' => '', |
@@ -48,4 +48,4 @@ discard block |
||
48 | 48 | ) |
49 | 49 | ); |
50 | 50 | |
51 | -file_put_contents($file, "<?php \n \n return ".var_export($env,true).";"); |
|
51 | +file_put_contents($file, "<?php \n \n return ".var_export($env, true).";"); |
@@ -58,6 +58,6 @@ |
||
58 | 58 | break; |
59 | 59 | } |
60 | 60 | |
61 | - return false; |
|
61 | + return FALSE; |
|
62 | 62 | } |
63 | 63 | } |
@@ -23,8 +23,8 @@ discard block |
||
23 | 23 | */ |
24 | 24 | public function __construct(OutputInterface $output) |
25 | 25 | { |
26 | - $this->_projectPath = getcwd(); |
|
27 | - $this->output = $output; |
|
26 | + $this->_projectPath=getcwd(); |
|
27 | + $this->output=$output; |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | /** |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | */ |
34 | 34 | function __get($name) |
35 | 35 | { |
36 | - $this->_config = $this->getConfigFile($this->output); |
|
36 | + $this->_config=$this->getConfigFile($this->output); |
|
37 | 37 | return $this->_config['magestead']['apps']['mba_12345'][$name]; |
38 | 38 | } |
39 | 39 | |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | */ |
44 | 44 | protected function getConfigFile(OutputInterface $output) |
45 | 45 | { |
46 | - $config = new Parser(); |
|
46 | + $config=new Parser(); |
|
47 | 47 | try { |
48 | 48 | return $config->parse($this->readConfigFile()); |
49 | 49 | } catch (ParseException $e) { |
@@ -59,11 +59,11 @@ discard block |
||
59 | 59 | */ |
60 | 60 | protected function readConfigFile() |
61 | 61 | { |
62 | - if (!file_exists($this->_projectPath . '/magestead.yaml')) { |
|
62 | + if (!file_exists($this->_projectPath.'/magestead.yaml')) { |
|
63 | 63 | throw new MissingConfigFileException('No config file was found, are you in the project root?'); |
64 | 64 | } |
65 | 65 | |
66 | - return file_get_contents($this->_projectPath . '/magestead.yaml'); |
|
66 | + return file_get_contents($this->_projectPath.'/magestead.yaml'); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public function getComposerHomeDir() |
76 | 76 | { |
77 | - $composerConfig = shell_exec('composer config --list --global | grep home'); |
|
77 | + $composerConfig=shell_exec('composer config --list --global | grep home'); |
|
78 | 78 | |
79 | 79 | if (is_null($composerConfig)) { |
80 | 80 | throw new MissingComposerHomeException('Composer home directory is not found. Do you have it installed?'); |
@@ -21,8 +21,7 @@ discard block |
||
21 | 21 | * Config constructor. |
22 | 22 | * @param OutputInterface $output |
23 | 23 | */ |
24 | - public function __construct(OutputInterface $output) |
|
25 | - { |
|
24 | + public function __construct(OutputInterface $output) { |
|
26 | 25 | $this->_projectPath = getcwd(); |
27 | 26 | $this->output = $output; |
28 | 27 | } |
@@ -31,8 +30,7 @@ discard block |
||
31 | 30 | * @param $name |
32 | 31 | * @return mixed |
33 | 32 | */ |
34 | - function __get($name) |
|
35 | - { |
|
33 | + function __get($name) { |
|
36 | 34 | $this->_config = $this->getConfigFile($this->output); |
37 | 35 | return $this->_config['magestead']['apps']['mba_12345'][$name]; |
38 | 36 | } |
@@ -41,8 +39,7 @@ discard block |
||
41 | 39 | * @param OutputInterface $output |
42 | 40 | * @return bool|mixed |
43 | 41 | */ |
44 | - protected function getConfigFile(OutputInterface $output) |
|
45 | - { |
|
42 | + protected function getConfigFile(OutputInterface $output) { |
|
46 | 43 | $config = new Parser(); |
47 | 44 | try { |
48 | 45 | return $config->parse($this->readConfigFile()); |
@@ -57,8 +54,7 @@ discard block |
||
57 | 54 | * @return string |
58 | 55 | * @throws MissingConfigFileException |
59 | 56 | */ |
60 | - protected function readConfigFile() |
|
61 | - { |
|
57 | + protected function readConfigFile() { |
|
62 | 58 | if (!file_exists($this->_projectPath . '/magestead.yaml')) { |
63 | 59 | throw new MissingConfigFileException('No config file was found, are you in the project root?'); |
64 | 60 | } |
@@ -72,8 +68,7 @@ discard block |
||
72 | 68 | * @return string |
73 | 69 | * @throws MissingComposerHomeException |
74 | 70 | */ |
75 | - public function getComposerHomeDir() |
|
76 | - { |
|
71 | + public function getComposerHomeDir() { |
|
77 | 72 | $composerConfig = shell_exec('composer config --list --global | grep home'); |
78 | 73 | |
79 | 74 | if (is_null($composerConfig)) { |