protected function supports($attribute, $subject)
    {
        if (!in_array($attribute, [Permission::BROWSE, Permission::READ, Permission::EDIT, Permission::ADD, Permission::DELETE, Permission::EXECUTE], true)) {
            return false;
        }

        if (!is_string($subject)) {
            return false;
        }

        $permission = $this->permissionCollection->get($subject);

        if (!$permission) {
            return false;
        }

        if (Permission::GENERIC !== $permission->getType()) {
            return false;
        }

        return true;
    }
protected function supports($attribute, $subject)
    {
        if (!in_array($attribute, [Permission::BROWSE, Permission::READ, Permission::EDIT, Permission::ADD, Permission::DELETE, Permission::EXECUTE], true)) {
            return false;
        }

        if (!is_string($subject)) {
            return false;
        }

        $permission = $this->permissionCollection->get($subject);

        if (!$permission) {
            return false;
        }

        if (Permission::GENERIC !== $permission->getType()) {
            return false;
        }

        return true;
    }
{@inheritdoc}