protected function validateParamsAndArgs() { $error_out = false; # Get the format and make sure it is set to a valid default value $format = strtolower($this->getOption('format', 'PHP')); $validFormat = in_array($format, self::$outFormats); if (!$validFormat) { $this->error("--format set to an unrecognized format", 0); $error_out = true; } if ($this->getOption('regex') && $this->getOption('iregex')) { $this->error("Can only use either --regex or --iregex"); $error_out = true; } parent::validateParamsAndArgs(); if ($error_out) { # Force help and quit $this->maybeHelp(true); } }
function validateParamsAndArgs() { if (!$this->hasOption('env-checks')) { parent::validateParamsAndArgs(); } }