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 has been archived by the owner on Jan 29, 2020. It is now read-only.
/**
* Builds and populates Action object based on the provided class name
*
* @param string $className
* @return Action
*/
public function buildAction($className)
{
$classReflection = new ClassReflection($className);
$scanner = new FileScanner($classReflection->getFileName(), $this->annotationManager);
$classScanner = $scanner->getClass($classReflection->getName());
$action = new Action($classScanner->getName());
foreach ($classScanner->getMethods() as $classMethod) {
if ($classMethod->isPublic() && $classMethod->getName() != '__construct') {
$action->addMethod($this->buildMethod($classMethod));
}
}
return $action;
}
/**
* Builds a method object based on the provided method scanner
*
* @param MethodScanner $classMethod
* @return Method
*/
protected function buildMethod(MethodScanner $classMethod)
{
$method = new Method($classMethod->getName());
$method->setNumberOfParameters($classMethod->getNumberOfParameters());
// Loop through annotations
if ($annotations = $classMethod->getAnnotations($this->annotationManager)) {
foreach ($annotations as $annotation) {
// @todo annotations should implement some kind of interface?
if (method_exists($annotation, 'decorateObject')) {
$annotation->decorateObject($method);
}
}
}
return $method;
}
With $params = [1,2], for example, notice disapears.
The text was updated successfully, but these errors were encountered:
I'm trying to set array for default value:
And getting notice:
Below is a piece of ApiBuilder.php:
With
$params = [1,2]
, for example, notice disapears.The text was updated successfully, but these errors were encountered: