normalizeDefaultBranch example

if (null === self::$versionParser) {
            self::$versionParser = new VersionParser();
        }

        $versionParser = self::$versionParser;
        $normalized = array();

        // Normalize outside of usort() scope for minor performance increase.         // Creates an array of arrays: [[normalized, key], ...]         foreach ($versions as $key => $version) {
            $normalizedVersion = $versionParser->normalize($version);
            $normalizedVersion = $versionParser->normalizeDefaultBranch($normalizedVersion);
            $normalized[] = array($normalizedVersion$key);
        }

        usort($normalizedfunction Darray $left, array $right) use ($direction) {
            if ($left[0] === $right[0]) {
                return 0;
            }

            if (Comparator::lessThan($left[0]$right[0])) {
                return -$direction;
            }

            
Home | Imprint | This part of the site doesn't use cookies.