public function getSortedProductionVersions($descending = false)
    {
        $versions = [];
        foreach ($this->getVersions() as $v) {
            if (strpos($v->getVersion(), Package\Version::DEV_PREFIX) !== 0) {
                $versions[] = $v;
            }
        }
        usort($versions, function (Package\Version $a, Package\Version $b) use ($descending) {
            return version_compare($a->getVersion(), $b->getVersion()) * ($descending ? -1 : 1);
        });

        return $versions;
    }
public function getSortedProductionVersions($descending = false)
    {
        $versions = [];
        foreach ($this->getVersions() as $v) {
            if (strpos($v->getVersion(), Package\Version::DEV_PREFIX) !== 0) {
                $versions[] = $v;
            }
        }
        usort($versions, function (Package\Version $a, Package\Version $b) use ($descending) {
            return version_compare($a->getVersion(), $b->getVersion()) * ($descending ? -1 : 1);
        });

        return $versions;
    }
public function getSortedProductionVersions ( $ descending = false ) { $ versions = [ ] ; foreach ( $ this -> getVersions ( ) as $ v ) { if ( strpos ( $ v -> getVersion ( ) , Package \ Version :: DEV_PREFIX ) !== 0 ) { $ versions [ ] = $ v ; } } usort ( $ versions , function ( Package \ Version $ a , Package \ Version $ b ) use ( $ descending ) { return version_compare ( $ a -> getVersion ( ) , $ b -> getVersion ( ) ) * ( $ descending ? - 1 : 1 ) ; } ) ; return $ versions ; }
Get the production versions, sorted in ascending or descending order.

@param bool $descending

@return \CommunityTranslation\Entity\Package\Version[]
Get the production versions sorted in ascending or descending order .