Beispiel #1
0
 /**
  * Creates a clean php depend instance with some base settings.
  *
  * @return \PDepend\Engine
  */
 private function createInstance()
 {
     $application = new Application();
     if (file_exists(getcwd() . '/pdepend.xml')) {
         $application->setConfigurationFile(getcwd() . '/pdepend.xml');
     } elseif (file_exists(getcwd() . '/pdepend.xml.dist')) {
         $application->setConfigurationFile(getcwd() . '/pdepend.xml.dist');
     }
     return $application->getEngine();
 }
Beispiel #2
0
 /**
  * Prints the analyzer options.
  *
  * @param integer $length Length of the longest option.
  *
  * @return integer
  */
 protected function printAnalyzerOptions($length)
 {
     $options = $this->application->getAvailableAnalyzerOptions();
     if (count($options) === 0) {
         return $length;
     }
     ksort($options);
     foreach ($options as $option => $info) {
         if (isset($info['value'])) {
             $option .= '=<' . $info['value'] . '>';
         } else {
             $option .= '=<value>';
         }
         $this->printOption($option, $info['message'], $length);
     }
     echo PHP_EOL;
     return $length;
 }
Beispiel #3
0
 /**
  * Creates a clean php depend instance with some base settings.
  *
  * @return \PDepend\Engine
  */
 private function createInstance()
 {
     $application = new Application();
     return $application->getEngine();
 }