Code Duplication    Length = 9-9 lines in 2 locations

src/Acl/AclMiddleware.php 2 locations

@@ 152-160 (lines=9) @@
149
        return $action;
150
    }
151
152
    protected function isAllowedForUser($aclResource, $action, $namespace = '')
153
    {
154
        if (!$this->service->acl()->hasResource($namespace . $aclResource)) {
155
156
            return false;
157
        }
158
159
        return $this->user->can($namespace . $aclResource, $action);
160
    }
161
162
    protected function isAllowedForGuest($aclResource, $action, $namespace = '')
163
    {
@@ 162-170 (lines=9) @@
159
        return $this->user->can($namespace . $aclResource, $action);
160
    }
161
162
    protected function isAllowedForGuest($aclResource, $action, $namespace = '')
163
    {
164
        if (!$aclResource || !$this->service->acl()->hasResource($namespace . $aclResource)) {
165
166
            return false;
167
        }
168
169
        return $this->service->acl()->isAllowed(Roles::GUEST, $namespace . $aclResource, $action);
170
    }
171
}