original_string: public function isMod($userId = null)
      {
          if (User::can(Rbac::ROLE_ADMIN)) {
              return true;
          }
          if (in_array($userId, $this->forum->getMods())) {
              return true;
          }
          return false;
      }
code: public function isMod($userId = null)
      {
          if (User::can(Rbac::ROLE_ADMIN)) {
              return true;
          }
          if (in_array($userId, $this->forum->getMods())) {
              return true;
          }
          return false;
      }
code_tokens: public function isMod ( $ userId = null ) { if ( User :: can ( Rbac :: ROLE_ADMIN ) ) { return true ; } if ( in_array ( $ userId , $ this -> forum -> getMods ( ) ) ) { return true ; } return false ; }
docstring: Checks if user is this thread moderator.
  @param int $userId
  @return bool
docstring_tokens: Checks if user is this thread moderator .