@@ -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,15 +74,15 @@ discard block |
||
| 74 | 74 | */ |
| 75 | 75 | public function getComposerHomeDir() |
| 76 | 76 | { |
| 77 | - $composerConfig = shell_exec('composer config --list --global | grep "\[home\]"'); |
|
| 78 | - $composerConfig = array_filter(explode(PHP_EOL, $composerConfig)); |
|
| 77 | + $composerConfig=shell_exec('composer config --list --global | grep "\[home\]"'); |
|
| 78 | + $composerConfig=array_filter(explode(PHP_EOL, $composerConfig)); |
|
| 79 | 79 | |
| 80 | 80 | foreach ($composerConfig as $line) { |
| 81 | - $parts = array_filter(explode(" ", $line)); |
|
| 82 | - $composerConfig[$parts[0]] = $parts[1]; |
|
| 81 | + $parts=array_filter(explode(" ", $line)); |
|
| 82 | + $composerConfig[$parts[0]]=$parts[1]; |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | - $composerHomePath = realpath(trim($composerConfig['[home]'])); |
|
| 85 | + $composerHomePath=realpath(trim($composerConfig['[home]'])); |
|
| 86 | 86 | |
| 87 | 87 | if (false === $composerHomePath) { |
| 88 | 88 | throw new MissingComposerHomeException('Composer home directory is not found. Do you have it installed?'); |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | $output->writeln('<error>Unable to parse the config file</error>'); |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | - return false; |
|
| 53 | + return FALSE; |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | /** |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | |
| 85 | 85 | $composerHomePath = realpath(trim($composerConfig['[home]'])); |
| 86 | 86 | |
| 87 | - if (false === $composerHomePath) { |
|
| 87 | + if (FALSE === $composerHomePath) { |
|
| 88 | 88 | throw new MissingComposerHomeException('Composer home directory is not found. Do you have it installed?'); |
| 89 | 89 | } |
| 90 | 90 | |
@@ -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 | $composerConfig = array_filter(explode(PHP_EOL, $composerConfig)); |
| 79 | 74 | |