From 4db131fac8f139456457dfa205d67169ced18d3c Mon Sep 17 00:00:00 2001 From: Freek Van der Herten Date: Mon, 18 Jul 2016 19:29:43 +0200 Subject: [PATCH] Simplify logic --- src/Closca/Sonus/Sonus.php | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/Closca/Sonus/Sonus.php b/src/Closca/Sonus/Sonus.php index c128ff9..22ce61c 100644 --- a/src/Closca/Sonus/Sonus.php +++ b/src/Closca/Sonus/Sonus.php @@ -192,12 +192,7 @@ public static function canEncode($format) $formats = array_merge(self::getSupportedAudioEncoders(), self::getSupportedVideoEncoders()); // Return boolean if they can be encoded or not - if(!in_array($format, $formats)) - { - return false; - } else { - return true; - } + return in_array($format, $formats); } /** @@ -211,12 +206,7 @@ public static function canDecode($format) $formats = array_merge(self::getSupportedAudioDecoders(), self::getSupportedVideoDecoders()); // Return boolean if they can be encoded or not - if(!in_array($format, $formats)) - { - return false; - } else { - return true; - } + return in_array($format, $formats); } /** @@ -726,4 +716,4 @@ public function getVideoJsonDetails() return shell_exec($cmd); } -} \ No newline at end of file +}