/**
  * @param string          $ability
  * @param mixed           $arguments
  * @param ErrorCollection $errors
  *
  * @return bool
  *
  * @SuppressWarnings(PHPMD.StaticAccess)
  */
 protected function checkAllow($ability, $arguments, ErrorCollection $errors)
 {
     $isAllowed = $this->getGate()->allows($ability, $arguments);
     if ($isAllowed === false) {
         $title = T::trans(T::KEY_ERR_UNAUTHORIZED);
         $errors->add(new Error(null, null, null, null, $title));
     }
     return $isAllowed;
 }