src/UrlPath.php
public function getParentDirectory(): ?UrlPathInterface
    {
        if ($this->myParentDirectory($aboveBaseLevel, $directoryParts)) {
            return new self($this->myIsAbsolute, $aboveBaseLevel, $directoryParts, null);
        }

        return null;
    }
public function getParentDirectory(): ?UrlPathInterface
    {
        if ($this->myParentDirectory($aboveBaseLevel, $directoryParts)) {
            return new self($this->myIsAbsolute, $aboveBaseLevel, $directoryParts, null);
        }

        return null;
    }
public function getParentDirectory ( ) : ? UrlPathInterface { if ( $ this -> myParentDirectory ( $ aboveBaseLevel , $ directoryParts ) ) { return new self ( $ this -> myIsAbsolute , $ aboveBaseLevel , $ directoryParts , null ) ; } return null ; }
Returns the parent directory of the url path or null if url path does not have a parent directory.

@since 1.0.0

@return UrlPathInterface|null The parent directory of the url path or null if url path does not have a parent directory.
Returns the parent directory of the url path or null if url path does not have a parent directory .