protected function getDistributionFilePath(string $path): string
    {
        $postfix = self::DIST_FILENAME_POSTFIX;

        if (empty($path)) {
            $path = $this->fileName;
        }

        // Check if this is the distribution file path
        $pathinfo = pathinfo($path);
        $postfixIndex = strlen($pathinfo['filename']) - strlen($postfix);
        $isDistributionFile = substr($pathinfo['filename'], $postfixIndex) === $postfix;
        if (!$isDistributionFile) {
            $extension = !empty($pathinfo['extension']) ? '.' . $pathinfo['extension'] : '';
            $path = $pathinfo['filename'] . $postfix . $extension;
        }

        return $path;
    }
protected function getDistributionFilePath(string $path): string
    {
        $postfix = self::DIST_FILENAME_POSTFIX;

        if (empty($path)) {
            $path = $this->fileName;
        }

        // Check if this is the distribution file path
        $pathinfo = pathinfo($path);
        $postfixIndex = strlen($pathinfo['filename']) - strlen($postfix);
        $isDistributionFile = substr($pathinfo['filename'], $postfixIndex) === $postfix;
        if (!$isDistributionFile) {
            $extension = !empty($pathinfo['extension']) ? '.' . $pathinfo['extension'] : '';
            $path = $pathinfo['filename'] . $postfix . $extension;
        }

        return $path;
    }
protected function getDistributionFilePath ( string $ path ) : string { $ postfix = self :: DIST_FILENAME_POSTFIX ; if ( empty ( $ path ) ) { $ path = $ this -> fileName ; } // Check if this is the distribution file path $ pathinfo = pathinfo ( $ path ) ; $ postfixIndex = strlen ( $ pathinfo [ 'filename' ] ) - strlen ( $ postfix ) ; $ isDistributionFile = substr ( $ pathinfo [ 'filename' ] , $ postfixIndex ) === $ postfix ; if ( ! $ isDistributionFile ) { $ extension = ! empty ( $ pathinfo [ 'extension' ] ) ? '.' . $ pathinfo [ 'extension' ] : '' ; $ path = $ pathinfo [ 'filename' ] . $ postfix . $ extension ; } return $ path ; }
Get file path string for the corresponding distribution file

If distribution file path is given, return as is. Otherwise
adjust the provided one.

@param string $path File path
@return string
Get file path string for the corresponding distribution file