public function apply(PHPUnit_Util_Metrics $metrics)
 {
     $locExecutable = $metrics->getLocExecutable();
     if ($locExecutable > $this->threshold) {
         return sprintf("Class has %d lines of executable code.\n" . 'This is an indication that the class may be ' . 'trying to do too much. Try to break it down, ' . 'and reduce the size to something manageable.', $locExecutable);
     }
 }
Esempio n. 2
0
 public function apply(PHPUnit_Util_Metrics $metrics)
 {
     $locExecutable = $metrics->getLocExecutable();
     if ($locExecutable >= $this->threshold) {
         return sprintf("Function or method has %d lines of executable code.\n" . 'Violations of this rule usually indicate that the method is ' . 'doing too much. Try to reduce the method size by creating ' . 'helper methods and removing any copy/pasted code.', $locExecutable);
     }
 }