@@ 327-342 (lines=16) @@ | ||
324 | * @return bool Returns `true` if the command option with the given name |
|
325 | * could be found and `false` otherwise. |
|
326 | */ |
|
327 | public function hasCommandOption($name, $includeBase = true) |
|
328 | { |
|
329 | Assert::string($name, 'The option name must be a string or an integer. Got: %s'); |
|
330 | Assert::notEmpty($name, 'The option name must not be empty.'); |
|
331 | Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s'); |
|
332 | ||
333 | if (isset($this->commandOptions[$name]) || isset($this->commandOptionsByShortName[$name])) { |
|
334 | return true; |
|
335 | } |
|
336 | ||
337 | if ($includeBase && $this->baseFormat) { |
|
338 | return $this->baseFormat->hasCommandOption($name); |
|
339 | } |
|
340 | ||
341 | return false; |
|
342 | } |
|
343 | ||
344 | /** |
|
345 | * Returns whether the format contains command options. |
|
@@ 674-689 (lines=16) @@ | ||
671 | * @return bool Returns `true` if the option with the given name could be |
|
672 | * found and `false` otherwise. |
|
673 | */ |
|
674 | public function hasOption($name, $includeBase = true) |
|
675 | { |
|
676 | Assert::string($name, 'The option name must be a string or an integer. Got: %s'); |
|
677 | Assert::notEmpty($name, 'The option name must not be empty.'); |
|
678 | Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s'); |
|
679 | ||
680 | if (isset($this->options[$name]) || isset($this->optionsByShortName[$name])) { |
|
681 | return true; |
|
682 | } |
|
683 | ||
684 | if ($includeBase && $this->baseFormat) { |
|
685 | return $this->baseFormat->hasOption($name); |
|
686 | } |
|
687 | ||
688 | return false; |
|
689 | } |
|
690 | ||
691 | /** |
|
692 | * Returns whether the format contains options. |
@@ 337-352 (lines=16) @@ | ||
334 | * @return bool Returns `true` if the command option with the given name |
|
335 | * could be found and `false` otherwise. |
|
336 | */ |
|
337 | public function hasCommandOption($name, $includeBase = true) |
|
338 | { |
|
339 | Assert::string($name, 'The option name must be a string or an integer. Got: %s'); |
|
340 | Assert::notEmpty($name, 'The option name must not be empty.'); |
|
341 | Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s'); |
|
342 | ||
343 | if (isset($this->commandOptions[$name]) || isset($this->commandOptionsByShortName[$name])) { |
|
344 | return true; |
|
345 | } |
|
346 | ||
347 | if ($includeBase && $this->baseFormat) { |
|
348 | return $this->baseFormat->hasCommandOption($name); |
|
349 | } |
|
350 | ||
351 | return false; |
|
352 | } |
|
353 | ||
354 | /** |
|
355 | * Returns whether the builder contains any command options. |
|
@@ 807-822 (lines=16) @@ | ||
804 | * @return bool Returns `true` if the option with the given name could be |
|
805 | * found and `false` otherwise. |
|
806 | */ |
|
807 | public function hasOption($name, $includeBase = true) |
|
808 | { |
|
809 | Assert::string($name, 'The option name must be a string or an integer. Got: %s'); |
|
810 | Assert::notEmpty($name, 'The option name must not be empty.'); |
|
811 | Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s'); |
|
812 | ||
813 | if (isset($this->options[$name]) || isset($this->optionsByShortName[$name])) { |
|
814 | return true; |
|
815 | } |
|
816 | ||
817 | if ($includeBase && $this->baseFormat) { |
|
818 | return $this->baseFormat->hasOption($name); |
|
819 | } |
|
820 | ||
821 | return false; |
|
822 | } |
|
823 | ||
824 | /** |
|
825 | * Returns whether the builder contains any option. |