/** * @param Parser $phpParser * @param NodeTraverser $traverser * @param Filesystem $filesystem */ public function __construct(Parser $phpParser = null, NodeTraverser $traverser = null, Filesystem $filesystem = null) { if ($phpParser === null) { $phpParser = (new ParserFactory())->create(ParserFactory::PREFER_PHP7); } if ($traverser === null) { $traverser = new NodeTraverser(); } if ($filesystem === null) { $filesystem = new Filesystem(); } $this->phpParser = $phpParser; $this->traverser = $traverser; parent::__construct($filesystem); }
/** * @param Lexer $lexer * @param Filesystem $filesystem */ public function __construct(Lexer $lexer, Filesystem $filesystem) { $this->lexer = $lexer; parent::__construct($filesystem); }