public function getCompressionAlgorithm()
    {
        if (isset($this->raw->compression)) {
            if (is_string($this->raw->compression)) {
                if (false === defined('Phar::' . $this->raw->compression)) {
                    throw new InvalidArgumentException(
                        sprintf(
                            'The compression algorithm "%s" is not supported.',
                            $this->raw->compression
                        )
                    );
                }

                $value = constant('Phar::' . $this->raw->compression);

                // Phar::NONE is not valid for compressFiles()
                if (Phar::NONE === $value) {
                    return null;
                }

                return $value;
            }

            return $this->raw->compression;
        }

        return null;
    }
public function getCompressionAlgorithm()
    {
        if (isset($this->raw->compression)) {
            if (is_string($this->raw->compression)) {
                if (false === defined('Phar::' . $this->raw->compression)) {
                    throw new InvalidArgumentException(
                        sprintf(
                            'The compression algorithm "%s" is not supported.',
                            $this->raw->compression
                        )
                    );
                }

                $value = constant('Phar::' . $this->raw->compression);

                // Phar::NONE is not valid for compressFiles()
                if (Phar::NONE === $value) {
                    return null;
                }

                return $value;
            }

            return $this->raw->compression;
        }

        return null;
    }
public function getCompressionAlgorithm ( ) { if ( isset ( $ this -> raw -> compression ) ) { if ( is_string ( $ this -> raw -> compression ) ) { if ( false === defined ( 'Phar::' . $ this -> raw -> compression ) ) { throw new InvalidArgumentException ( sprintf ( 'The compression algorithm "%s" is not supported.' , $ this -> raw -> compression ) ) ; } $ value = constant ( 'Phar::' . $ this -> raw -> compression ) ; // Phar::NONE is not valid for compressFiles() if ( Phar :: NONE === $ value ) { return null ; } return $ value ; } return $ this -> raw -> compression ; } return null ; }
Returns the Phar compression algorithm.

@return integer The compression algorithm.

@throws InvalidArgumentException If the algorithm is not valid.
Returns the Phar compression algorithm .