private function buildMagicMethods($magicMethods, $className)
{
$res = [];
foreach ($magicMethods as $method) {
$description = $method->getDescription();
if (is_null($description)) {
continue;
}
$doc = new DocBlockStripSpaces(substr($method->getDescription(), 1, -1));
$res[] = ['name' => $method->getMethodName(), 'doc' => $doc];
}
return $res;
}