protected function castToArray(&$subject)
    {
        if (is_array($subject) === false) {
            if (Arr::accessible($subject) === false) {
                $subject = new Collection($subject);
            }
            $subject = $subject instanceof Arrayable ? $subject->toArray() : (array)$subject;
        }
        return $this;
    }