src/Magestead/Command/SetupCommand.php 1 location
|
@@ 100-109 (lines=10) @@
|
| 97 |
|
* @param OutputInterface $output |
| 98 |
|
* @return mixed |
| 99 |
|
*/ |
| 100 |
|
protected function getConfigFile(OutputInterface $output) |
| 101 |
|
{ |
| 102 |
|
$yaml = new Parser(); |
| 103 |
|
try { |
| 104 |
|
return $yaml->parse(file_get_contents($this->_projectPath . '/magestead.yaml')); |
| 105 |
|
} catch (ParseException $e) { |
| 106 |
|
$output->writeln('<error>Unable to parse the YAML string</error>'); |
| 107 |
|
printf("Unable to parse the YAML string: %s", $e->getMessage()); |
| 108 |
|
} |
| 109 |
|
} |
| 110 |
|
|
| 111 |
|
/** |
| 112 |
|
* @param array $config |
src/Magestead/Helper/Config.php 1 location
|
@@ 34-44 (lines=11) @@
|
| 31 |
|
* @param OutputInterface $output |
| 32 |
|
* @return bool|mixed |
| 33 |
|
*/ |
| 34 |
|
protected function getConfigFile(OutputInterface $output) |
| 35 |
|
{ |
| 36 |
|
$config = new Parser(); |
| 37 |
|
try { |
| 38 |
|
return $config->parse(file_get_contents($this->_projectPath . '/magestead.yaml')); |
| 39 |
|
} catch (ParseException $e) { |
| 40 |
|
$output->writeln('<error>Unable to parse the config file</error>'); |
| 41 |
|
} |
| 42 |
|
|
| 43 |
|
return false; |
| 44 |
|
} |
| 45 |
|
} |
| 46 |
|
|