src/Api/Args/Format/ArgsFormat.php 1 location
|
@@ 519-532 (lines=14) @@
|
| 516 |
|
* @return bool Returns `true` if the format contains a required argument |
| 517 |
|
* and `false` otherwise. |
| 518 |
|
*/ |
| 519 |
|
public function hasRequiredArgument($includeBase = true) |
| 520 |
|
{ |
| 521 |
|
Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s'); |
| 522 |
|
|
| 523 |
|
if (!$this->hasOptionalArg && count($this->arguments) > 0) { |
| 524 |
|
return true; |
| 525 |
|
} |
| 526 |
|
|
| 527 |
|
if ($includeBase && $this->baseFormat) { |
| 528 |
|
return $this->baseFormat->hasRequiredArgument(); |
| 529 |
|
} |
| 530 |
|
|
| 531 |
|
return false; |
| 532 |
|
} |
| 533 |
|
|
| 534 |
|
/** |
| 535 |
|
* Returns whether the format contains any argument. |
src/Api/Args/Format/ArgsFormatBuilder.php 1 location
|
@@ 612-625 (lines=14) @@
|
| 609 |
|
* @return bool Returns `true` if the builder contains a required argument |
| 610 |
|
* and `false` otherwise. |
| 611 |
|
*/ |
| 612 |
|
public function hasRequiredArgument($includeBase = true) |
| 613 |
|
{ |
| 614 |
|
Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s'); |
| 615 |
|
|
| 616 |
|
if (!$this->hasOptionalArg && count($this->arguments) > 0) { |
| 617 |
|
return true; |
| 618 |
|
} |
| 619 |
|
|
| 620 |
|
if ($includeBase && $this->baseFormat) { |
| 621 |
|
return $this->baseFormat->hasRequiredArgument(); |
| 622 |
|
} |
| 623 |
|
|
| 624 |
|
return false; |
| 625 |
|
} |
| 626 |
|
|
| 627 |
|
/** |
| 628 |
|
* Returns whether the builder contains any argument. |