function ArgumentMetadata::getDefaultValue
Returns the default value of the argument.
Throws
\LogicException if no default value is present; {
See also
File
-
vendor/
symfony/ http-kernel/ ControllerMetadata/ ArgumentMetadata.php, line 88
Class
- ArgumentMetadata
- Responsible for storing metadata of an argument.
Namespace
Symfony\Component\HttpKernel\ControllerMetadataCode
public function getDefaultValue() : mixed {
if (!$this->hasDefaultValue) {
throw new \LogicException(\sprintf('Argument $%s does not have a default value. Use "%s::hasDefaultValue()" to avoid this exception.', $this->name, __CLASS__));
}
return $this->defaultValue;
}