protected function getProjectPackageName($projectName, $repositoryUrl)
    {
        $packageName = null;

        if ($this->hasComposerJson($projectName)) {
            $packageName = $this->getPackageNameByComposerJson($projectName);
        }

        return $packageName ? $packageName : $this->getPackageNameByRepositoryUrl($repositoryUrl);
    }