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)); }
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; }
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?"); }
/** * 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']); }
/** * @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); }