private function installerToData(InstallerDescriptor $installer)
    {
        $data = (object) array(
            'class' => $installer->getClassName(),
        );

        if ($installer->getDescription()) {
            $data->description = $installer->getDescription();
        }

        if ($installer->getParameters()) {
            $data->parameters = $this->parametersToData($installer->getParameters());
        }

        return $data;
    }