/** * Returns the regular expression the pattern represents. * * @return string */ public function getRegEx() { if ($this->id == T_ANY) { return '(\\bT_.*\\b )'; } return '(\\b' . Constants::getTokenName($this->id) . '\\b)'; }
protected function setUp() { Constants::init(); $this->file = Tokenizer::tokenize('test.php', '<php print true; ?>'); $this->result = new Result(); $this->result->addFile('test.php'); $this->rule = new TestRuleSubclass(); }
protected function setUp() { Constants::init(); }