コード例 #1
0
 public function configure()
 {
     if (!$this->isEnabled()) {
         return;
     }
     $default = $this->settings->getDefaultValueFor('phpSrcPath', array('src'));
     $this->settings['phpSrcPath'] = $this->multiplePathHelper->askPaths("At which paths is the PHP source code located?", implode(',', $default));
 }
コード例 #2
0
 public function configure()
 {
     if (!$this->settings['enablePhpTools']) {
         $this->settings['enablePhpMessDetector'] = false;
         return false;
     }
     $default = $this->settings->getDefaultValueFor('enablePhpMessDetector', true);
     $this->settings['enablePhpMessDetector'] = $this->dialog->askConfirmation($this->output, "Do you want to enable the PHP Mess Detector?", $default);
     // Exclude default patterns
     $default = $this->settings->getDefaultValueFor('phpMdExcludePatterns', array());
     $excludePatterns = $this->multiplePathHelper->askPatterns("  - Which patterns should be excluded for PHP Mess Detector?", implode(',', $default), "  - Do you want to exclude custom patterns for PHP Mess Detector?", !empty($default));
     $this->settings['phpMdExcludePatterns'] = $excludePatterns;
 }
コード例 #3
0
 public function configure()
 {
     if (!$this->settings['enablePhpTools']) {
         $this->settings['enablePhpCopyPasteDetection'] = false;
         return;
     }
     $default = $this->settings->getDefaultValueFor('enablePhpCopyPasteDetection', false);
     $this->settings['enablePhpCopyPasteDetection'] = $this->dialog->askConfirmation($this->output, "Do you want to enable PHP Copy Paste Detection?", $default);
     if (!$this->settings['enablePhpCopyPasteDetection']) {
         return;
     }
     // Tests is the Symfony default
     $default = $this->settings->getDefaultValueFor('phpCpdExcludePatterns', 'Tests');
     $this->settings['phpCpdExcludePatterns'] = $this->multiplePathHelper->askPatterns(" - Which patterns should be excluded for PHP Copy Paste detection?", $default, " - Do you want to exclude patterns for PHP Copy Paste detection?");
 }
コード例 #4
0
 /**
  * Asks if the user wants to exclude any other paths
  *
  * @param array $symfonyPatterns
  */
 protected function askExcludePatterns(array $symfonyPatterns)
 {
     // Exclude default patterns
     $default = $this->settings->getDefaultValueFor('phpCsExcludeCustomPatterns', false);
     $this->settings['phpCsExcludeCustomPatterns'] = $this->multiplePathHelper->askPatterns("  - Which patterns should be excluded for PHP Code Sniffer?", '', "  - Do you want to exclude some custom patterns for PHP Code Sniffer?", $default);
     $this->settings['phpCsExcludePatterns'] = array_merge($symfonyPatterns, $this->settings['phpCsExcludeCustomPatterns']);
 }
コード例 #5
0
 /**
  * @return mixed
  */
 protected function askForPathsToTests()
 {
     $default = $this->settings->getDefaultValueFor('phpTestsPath', 'tests');
     return $this->multiplePathHelper->askPaths("On what paths can the PHPUnit tests be found?", $default);
 }