public function fromCode($code, $context)
{
$tokens = token_get_all($code);
return $this->fromTokens($tokens, $context);
}
public function testWrongCommentType() { $analyser = new StaticAnalyser(); $this->assertSwaggerLogEntryStartsWith('Annotations are only parsed inside `/**` DocBlocks'); $analyser->fromCode("<?php\n/*\n * @SWG\\Parameter() */", new Context([])); }