setExcludeDirectories() public method

NOTE: If this method is called, it will overwrite the default settings.
public setExcludeDirectories ( array $excludeDirectories ) : void
$excludeDirectories array
return void
Exemplo n.º 1
0
 /**
  * Assign CLI arguments to current runner instance
  *
  * @return bool
  */
 protected function assignArguments()
 {
     if ($this->source) {
         $this->runner->setSourceArguments($this->source);
     }
     // Check for suffix option
     if (isset($this->options['--suffix'])) {
         // Get file extensions
         $extensions = explode(',', $this->options['--suffix']);
         // Set allowed file extensions
         $this->runner->setFileExtensions($extensions);
         unset($this->options['--suffix']);
     }
     // Check for ignore option
     if (isset($this->options['--ignore'])) {
         // Get exclude directories
         $directories = explode(',', $this->options['--ignore']);
         // Set exclude directories
         $this->runner->setExcludeDirectories($directories);
         unset($this->options['--ignore']);
     }
     // Check for exclude namespace option
     if (isset($this->options['--exclude'])) {
         // Get exclude directories
         $namespaces = explode(',', $this->options['--exclude']);
         // Set exclude namespace
         $this->runner->setExcludeNamespaces($namespaces);
         unset($this->options['--exclude']);
     }
     // Check for the bad documentation option
     if (isset($this->options['--bad-documentation'])) {
         echo "Option --bad-documentation is ambiguous.", PHP_EOL;
         unset($this->options['--bad-documentation']);
     }
     $configuration = $this->application->getConfiguration();
     // Store in config registry
     ConfigurationInstance::set($configuration);
     if (isset($this->options['--debug'])) {
         unset($this->options['--debug']);
         Log::setSeverity(Log::DEBUG);
     }
 }