You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 17, 2025. It is now read-only.
$setterMethodName = "set{$name}";
$reflectionClass = new ReflectionClass($this);
if ($reflectionClass->hasMethod($setterMethodName)) {
$reflectionNamedType = $reflectionClass->getMethod($setterMethodName)->getParameters()[0]->getType();
/* @var $reflectionNamedType ReflectionNamedType */
$parameterClassName = $reflectionNamedType->getName();
if (class_exists($parameterClassName)) {
$this->$setterMethodName(new $parameterClassName);
return $this->values[$name];
}
}
The variable $reflectionNamedType will be null if the parameter doesn't have an explicit type set, e.g. for the property setter: public function setCode($code).
This throws an uncaught error.
Seems either all the setters need to have the type set for their parameters, e.g. public function setCode(string $code) or else a check should be made to see if $reflectionNamedType is not null before calling ->getName() on it.
In this block in AbstractComplexType:
The variable
$reflectionNamedTypewill be null if the parameter doesn't have an explicit type set, e.g. for the property setter:public function setCode($code).This throws an uncaught error.
Seems either all the setters need to have the type set for their parameters, e.g.
public function setCode(string $code)or else a check should be made to see if$reflectionNamedTypeis not null before calling->getName()on it.