Now use 'instanceof' keyword instead of checking for existing methods
[core.git] / inc / classes / middleware / compressor / class_CompressorChannel.php
index 81b2fff..c1b213c 100644 (file)
@@ -49,9 +49,7 @@ class CompressorChannel extends BaseMiddleware implements Registerable {
                // Is the compressor handler set?
                if (
                           (is_null($compressorInstance->getCompressor()))
-                       || (!is_object($compressorInstance->getCompressor()))
-                       || (!method_exists($compressorInstance->getCompressor(), 'compressStream'))
-                       || (!method_exists($compressorInstance->getCompressor(), 'decompressStream'))
+                       || (!$compressorInstance->getCompressor() instanceof Compressor)
                ) {
                        // Init base directory
                        $baseDir =