src/Traits/PathTrait.php
private static function myHandleParentDirectoryPart(bool $isAbsolute, int &$aboveBaseLevel, array &$directoryParts, ?string &$error = null): bool
    {
        if (count($directoryParts) > 0) {
            array_pop($directoryParts);

            return true;
        }

        if ($isAbsolute) {
            $error = 'Absolute path is above root level.';

            return false;
        }

        $aboveBaseLevel++;

        return true;
    }
private static function myHandleParentDirectoryPart(bool $isAbsolute, int &$aboveBaseLevel, array &$directoryParts, ?string &$error = null): bool
    {
        if (count($directoryParts) > 0) {
            array_pop($directoryParts);

            return true;
        }

        if ($isAbsolute) {
            $error = 'Absolute path is above root level.';

            return false;
        }

        $aboveBaseLevel++;

        return true;
    }
private static function myHandleParentDirectoryPart ( bool $ isAbsolute , int & $ aboveBaseLevel , array & $ directoryParts , ? string & $ error = null ) : bool { if ( count ( $ directoryParts ) > 0 ) { array_pop ( $ directoryParts ) ; return true ; } if ( $ isAbsolute ) { $ error = 'Absolute path is above root level.' ; return false ; } $ aboveBaseLevel ++ ; return true ; }
Handles a parent directory part.

@param bool        $isAbsolute     Whether the path is absolute or relative.
@param int         $aboveBaseLevel The number of directory parts above base level.
@param array       $directoryParts The directory parts.
@param string|null $error          The error text if validation was not successful, undefined otherwise.

@return bool True if parsing was successful, false otherwise.
Handles a parent directory part .