public function getSortedVersions($descending = false, $developmentVersionsFirst = null)
    {
        if ($developmentVersionsFirst === null) {
            $versionComparer = new VersionComparer();
            $result = $versionComparer->sortPackageVersionEntities($this->getVersions()->toArray(), $descending);
        } else {
            $devVersions = $this->getSortedDevelopmentVersions($descending);
            $prodVersions = $this->getSortedProductionVersions($descending);
            if ($developmentVersionsFirst) {
                $result = array_merge($devVersions, $prodVersions);
            } else {
                $result = array_merge($prodVersions, $devVersions);
            }
        }

        return $result;
    }