protected function validateOutputLocation(string $format, ?string $output): string
    {
        $buildfileInfo = pathinfo($this->getBuildfile());

        // Fallback
        if (empty($output)) {
            $output = $buildfileInfo['dirname'];
        }

        // Adding filename if necessary
        if (is_dir($output)) {
            $output .= DIRECTORY_SEPARATOR . $buildfileInfo['filename'] . '.' . $format;
        }

        // Check if path is available
        if (!is_dir(dirname($output))) {
            throw new DiagramException(sprintf('Dir "%s" is invalid.', $output));
        }

        return $output;
    }
protected function validateOutputLocation(string $format, ?string $output): string
    {
        $buildfileInfo = pathinfo($this->getBuildfile());

        // Fallback
        if (empty($output)) {
            $output = $buildfileInfo['dirname'];
        }

        // Adding filename if necessary
        if (is_dir($output)) {
            $output .= DIRECTORY_SEPARATOR . $buildfileInfo['filename'] . '.' . $format;
        }

        // Check if path is available
        if (!is_dir(dirname($output))) {
            throw new DiagramException(sprintf('Dir "%s" is invalid.', $output));
        }

        return $output;
    }
protected function validateOutputLocation ( string $ format , ? string $ output ) : string { $ buildfileInfo = pathinfo ( $ this -> getBuildfile ( ) ) ; // Fallback if ( empty ( $ output ) ) { $ output = $ buildfileInfo [ 'dirname' ] ; } // Adding filename if necessary if ( is_dir ( $ output ) ) { $ output .= DIRECTORY_SEPARATOR . $ buildfileInfo [ 'filename' ] . '.' . $ format ; } // Check if path is available if ( ! is_dir ( dirname ( $ output ) ) ) { throw new DiagramException ( sprintf ( 'Dir "%s" is invalid.' , $ output ) ) ; } return $ output ; }
Load PlantUML diagram output location

@param string      $format
@param null|string $output

@return string
@throws \Jawira\PhingVisualizer\DiagramException
Load PlantUML diagram output location