mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 11:44:14 +01:00
disable comments support for now
This commit is contained in:
parent
e8351ce862
commit
0d907e60db
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user