public function getRequiredPackages()
    {
        $packages = [];

        $content = $this->getFileContents('composer.json');

        foreach (['require', 'require-dev'] as $key) {
            if (!isset($content[$key])) {
                continue;
            }

            foreach ($content[$key] as $name => $version) {
                if (!strstr($name, '/')) {
                    continue;
                }

                $packages[$name] = [
                    'name' => $name,
                    'version' => $version,
                    'devDependency' => $key === 'require-dev',
                ];
            }
        }

        if (empty($packages)) {
            throw new LogicException('We couldn\'t find any required packages.');
        }

        return $packages;
    }