Completed
Push — feature/composer-home-checking ( fae764 )
by Steven
03:52
created
src/Magestead/Exceptions/MissingComposerHomeException.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,4 +4,6 @@
 block discarded – undo
4 4
  * Class MissingComposerHomeException
5 5
  * @package Magestead\Exceptions
6 6
  */
7
-class MissingComposerHomeException extends \Exception {}
8 7
\ No newline at end of file
8
+class MissingComposerHomeException extends \Exception
9
+{
10
+}
9 11
\ No newline at end of file
Please login to merge, or discard this patch.
src/Magestead/Helper/Config.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -21,8 +21,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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)) {
Please login to merge, or discard this patch.