MDL-73700 fileconverter_googledrive: remove old PHP version workaround

As MDL-73016 set the minimum supported PHP version for Moodle 4.4 and up
to PHP 8.1 we can now safely write this as a one-liner.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
This commit is contained in:
Daniel Ziegenberg 2024-07-25 19:24:33 +02:00
parent da3b7722ae
commit 85304ca150
No known key found for this signature in database
GPG Key ID: 7E6F98FFADBEFD39

View File

@ -253,11 +253,8 @@ class converter implements \core_files\converter_interface {
* @param string $to The destination type
* @return bool
*/
public static function supports($from, $to) {
// This is not a one-liner because of php 5.6.
$imports = self::$imports;
$exports = self::$exports;
return isset($imports[$from]) && isset($exports[$to]);
public static function supports($from, $to): bool {
return isset(self::$imports[$from]) && isset(self::$exports[$to]);
}
/**