src/Metable/Attribute.php
protected function getMutator($value, $dir = 'setter', $type = null)
    {
        $type = $type ?: $this->getValueType($value);

        foreach ($this->{"{$dir}Mutators"} as $mutated => $mutator) {
            if ($type == $mutated || $value instanceof $mutated) {
                return $mutator;
            }
        }
    }
protected function getMutator($value, $dir = 'setter', $type = null)
    {
        $type = $type ?: $this->getValueType($value);

        foreach ($this->{"{$dir}Mutators"} as $mutated => $mutator) {
            if ($type == $mutated || $value instanceof $mutated) {
                return $mutator;
            }
        }
    }
Get mutator for the type.

@param  mixed  $value
@param  string $dir
@return string