From: Roland Häder Date: Sun, 2 Sep 2012 11:53:31 +0000 (+0000) Subject: Now use 'instanceof' keyword instead of checking for existing methods X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=94beb0b5c6195720b73166a91ad9a79674ef3b63;p=core.git Now use 'instanceof' keyword instead of checking for existing methods --- diff --git a/inc/classes/middleware/compressor/class_CompressorChannel.php b/inc/classes/middleware/compressor/class_CompressorChannel.php index 81b2ffff..c1b213cf 100644 --- a/inc/classes/middleware/compressor/class_CompressorChannel.php +++ b/inc/classes/middleware/compressor/class_CompressorChannel.php @@ -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 =