disable comments support for now

This commit is contained in:
TomasVotruba 2017-12-02 19:59:40 +01:00
parent e8351ce862
commit 0d907e60db
2 changed files with 6 additions and 7 deletions

View File

@ -2,18 +2,19 @@
namespace Rector\YamlParser;
use Klausi\YamlComments\ParseResult;
use Klausi\YamlComments\YamlComments;
use Rector\FileSystem\FileGuard;
use Symfony\Component\Yaml\Yaml;
final class YamlParser
{
public function parseFile(string $file): ParseResult
/**
* @return mixed[]
*/
public function parseFile(string $file): array
{
FileGuard::ensureFileExists($file, __METHOD__);
return YamlComments::parse(file_get_contents($file));
return Yaml::parse(file_get_contents($file));
}
/**

View File

@ -28,9 +28,7 @@ final class YamlRectorCollector
public function processFile(string $file): string
{
$parseResult = $this->yamlParser->parseFile($file);
$data = $parseResult->getData();
$data = $this->yamlParser->parseFile($file);
foreach ($this->yamlRectors as $yamlRector) {
if (! array_key_exists($yamlRector->getCandidateKey(), $data)) {