public function isValidTransformer($transformer): bool
    {
        if ($transformer instanceof TransformerInterface) {
            return true;
        }

        if (\is_callable($transformer)) {
            return true;
        }

        return false;
    }
public function isValidTransformer($transformer): bool
    {
        if ($transformer instanceof TransformerInterface) {
            return true;
        }

        if (\is_callable($transformer)) {
            return true;
        }

        return false;
    }
public function isValidTransformer ( $ transformer ) : bool { if ( $ transformer instanceof TransformerInterface ) { return true ; } if ( \ is_callable ( $ transformer ) ) { return true ; } return false ; }
Determines if the given argument is a valid transformer.

@param mixed $transformer

@return bool
Determines if the given argument is a valid transformer .