<?php
namespace Concrete\Core\Support\Facade;

class Image extends Facade
{

    public static function getFacadeAccessor()
    {

        if (class_exists('Imagick')) {
            $imagick = new \Imagick();
            $v = $imagick->getVersion();
            list($version, $year, $month, $day, $q, $website) = sscanf(
                $v['versionString'],
                'ImageMagick %s %04d-%02d-%02d %s %s');

            if (version_compare($version, '6.2.9') < 1) {
                return 'image/gd';
            } else {
                return 'image/imagick';
            }
        }

        return 'image/gd';
    }

}

<?php
namespace Concrete\Core\Support\Facade;

class Image extends Facade
{

    public static function getFacadeAccessor()
    {

        if (class_exists('Imagick')) {
            $imagick = new \Imagick();
            $v = $imagick->getVersion();
            list($version, $year, $month, $day, $q, $website) = sscanf(
                $v['versionString'],
                'ImageMagick %s %04d-%02d-%02d %s %s');

            if (version_compare($version, '6.2.9') >= 0) {
                return 'image/imagick';
            }
        }

        return 'image/gd';
    }

}

Define fallback case just once
Define fallback case just once
