Beispiel #1
0
 /**
  * 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)';
 }
Beispiel #2
0
 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();
 }
Beispiel #3
0
 protected function setUp()
 {
     Constants::init();
 }