private function normalizePipePath($path)
    {
        // Prepend slash if missing
        if (empty($path) || $path[0] !== '/') {
            $path = '/' . $path;
        }

        // Trim trailing slash if present
        if (strlen($path) > 1 && '/' === substr($path, -1)) {
            $path = rtrim($path, '/');
        }

        return $path;
    }
private function normalizePipePath($path)
    {
        // Prepend slash if missing
        if (empty($path) || $path[0] !== '/') {
            $path = '/' . $path;
        }

        // Trim trailing slash if present
        if (strlen($path) > 1 && '/' === substr($path, -1)) {
            $path = rtrim($path, '/');
        }

        return $path;
    }
private function normalizePipePath ( $ path ) { // Prepend slash if missing if ( empty ( $ path ) || $ path [ 0 ] !== '/' ) { $ path = '/' . $ path ; } // Trim trailing slash if present if ( strlen ( $ path ) > 1 && '/' === substr ( $ path , - 1 ) ) { $ path = rtrim ( $ path , '/' ) ; } return $ path ; }
Normalize a path used when defining a pipe

Strips trailing slashes, and prepends a slash.

@param string $path
@return string
Normalize a path used when defining a pipe