Esempio n. 1
0
 /**
  * @dataProvider provideClasses
  */
 public function testParse($class, $import, $expected)
 {
     /** @noinspection PhpIncludeInspection */
     require_once __DIR__ . '/resources/' . $import . '.php';
     $rClass = new ReflectionClass($class);
     $parser = new PhpParser();
     $this->assertEquals($expected, $parser->parseClass($rClass));
 }
Esempio n. 2
0
 /**
  * Sets a logger instance on the mixed
  *
  * @param LoggerInterface $logger
  * @return null
  */
 public function setLogger(LoggerInterface $logger)
 {
     $this->logger = $logger;
     if (isset($logger)) {
         $this->parser->setLogger($logger);
         $this->nsParser->setLogger($logger);
     }
 }