src/Tools/Parser.php
protected static function parseEachPart(array $parts, $format)
    {
        $lastPartKey = count($parts) - 1;

        for ($p = 0; $p <= $lastPartKey; $p++) {
            $parsedPart = static::parse($parts[$p], $format);
            $numNewParts = count($parsedPart);

            if ($numNewParts > 1) {
                array_splice($parts, $p, 1, $parsedPart);
                $p += $numNewParts;
                $lastPartKey += $numNewParts - 1;
            }
        } // end of parts for loop

        return $parts;
    }
protected static function parseEachPart(array $parts, $format)
    {
        $lastPartKey = count($parts) - 1;

        for ($p = 0; $p <= $lastPartKey; $p++) {
            $parsedPart = static::parse($parts[$p], $format);
            $numNewParts = count($parsedPart);

            if ($numNewParts > 1) {
                array_splice($parts, $p, 1, $parsedPart);
                $p += $numNewParts;
                $lastPartKey += $numNewParts - 1;
            }
        } // end of parts for loop

        return $parts;
    }
Parses each part of an identifier parts array using the given format
and merges the new parts into the array

@param array $parts The array of identifier parts to parse
@param string $format The string constant representing the format to
parse from

@return array The resulting array of parsed identifier parts