protected function detectType()
    {
        if (property_exists($this, 'allow')) {
            return $this->allow;
        }

        $interfaces = (new ReflectionClass($this))->getInterfaceNames();

        if ($interfaces) {
            return $interfaces[0];
        }

        return get_class($this);
    }