public hasCommandOptions ( boolean $includeBase = true ) : boolean | ||
$includeBase | boolean | Whether to include options in the base format in the search. |
return | boolean | Returns `true` if the format contains command options and `false` otherwise. |
public function hasCommandOptions($includeBase = true)
{
Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s');
if (count($this->commandOptions) > 0) {
return true;
}
if ($includeBase && $this->baseFormat) {
return $this->baseFormat->hasCommandOptions();
}
return false;
}
/** * Returns whether the builder contains any command options. * * @param bool $includeBase Whether to include command options in the base * format in the search. * * @return bool Returns `true` if the builder contains command options and * `false` otherwise. */ public function hasCommandOptions($includeBase = true) { Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s'); if (count($this->commandOptions) > 0) { return true; } if ($includeBase && $this->baseFormat) { return $this->baseFormat->hasCommandOptions(); } return false; }