protected function getMagicMethodType($method)
    {
        // If the method name is less than or equal to four characters
        // then it's not a getter or a setter
        if (strlen($method) <= 3) {
            throw new BadMethodCallException('Method not found');
        }

        // Whether we are setting or getting
        $type = substr($method, 0, 3);

        if ($type !== 'get' and $type !== 'set') {
            throw new BadMethodCallException('Method not found');
        }

        return $type;
    }