protected function getClassMethods($class)
    {
        // Get a reflection class.
        $classReflection = new \ReflectionClass($class);
        $methods = $classReflection->getMethods();

        $metaData = [];
        $methodData = [];

        foreach ($methods as $method) {
            $methodData['name'] = $method->getName();

            $filename = $method->getFileName();
            $source = file($filename);
            $startLine = $method->getStartLine();

            $methodData['declaration'] = substr(trim($source[$startLine - 1]), 0, -1);

            $methodDocComment = explode("\n", $method->getDocComment());
            foreach ($methodDocComment as $line) {
                if (substr($line, 0, 5) == '   * ') {
                    $methodData['description'] = substr($line, 5);
                    break;
                }
            }

            $metaData[$method->getName()] = $methodData;
        }

        return $metaData;
    }