public function createCollection()
    {
        $collectClass = $this->collectionClass();
        if ($collectClass === 'array') {
            return [];
        }

        if (!class_exists($collectClass)) {
            throw new RuntimeException(sprintf(
                'Collection class [%s] does not exist.',
                $collectClass
            ));
        }

        if (!is_subclass_of($collectClass, ArrayAccess::class)) {
            throw new RuntimeException(sprintf(
                'Collection class [%s] must implement ArrayAccess.',
                $collectClass
            ));
        }

        $collection = new $collectClass;

        return $collection;
    }