예제 #1
0
파일: Token.php 프로젝트: spriebsch/phpca
 /**
  * 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)';
 }
예제 #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();
 }
예제 #3
0
 protected function setUp()
 {
     Constants::init();
 }