]> git.mxchange.org Git - core.git/commitdiff
Now use 'instanceof' keyword instead of checking for existing methods
authorRoland Häder <roland@mxchange.org>
Sun, 2 Sep 2012 11:53:31 +0000 (11:53 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 2 Sep 2012 11:53:31 +0000 (11:53 +0000)
inc/classes/middleware/compressor/class_CompressorChannel.php

index 81b2ffff97c3b39b2bd9860aa980576b2fedfde6..c1b213cfc51172e000ad4552d32c994c1842e751 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 =