Skip to content

Commit

Permalink
Merge pull request #184 from ricardofiorani/fix-yaml-parse-error
Browse files Browse the repository at this point in the history
Add cast to string to avoid YAML parse error
  • Loading branch information
bmitch authored Sep 2, 2018
2 parents e483da0 + ea4e964 commit 3a84db1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Commands/ChurnCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
$config = Config::create(Yaml::parse(@file_get_contents($input->getOption('configuration'))) ?? []);
$content = (string) @file_get_contents($input->getOption('configuration'));
$config = Config::create(Yaml::parse($content) ?? []);

$filesCollection = (new FileManager($config->getFileExtensions(), $config->getFilesToIgnore()))
->getPhpFiles($this->getDirectoriesToScan($input, $config->getDirectoriesToScan()));
Expand Down

0 comments on commit 3a84db1

Please sign in to comment.