public function apply(AbstractNode $node)
 {
     $filename = $node->getFileName();
     $base = basename($filename, '.php');
     if (!preg_match('/^(SS_)?' . $base . '(_[A-Z][a-zA-Z0-9]+)?$/', $node->getName())) {
         $this->addViolation($node, array($node->getName(), basename($filename)));
     }
 }
예제 #2
0
 /**
  * Returns the file name where this rule violation was detected.
  *
  * @return string
  */
 public function getFileName()
 {
     return $this->node->getFileName();
 }