original_string: public function isMod($userId = null)
      {
          return (new Query())->from(Mod::tableName())->where(['forum_id' => $this->id, 'user_id' => $userId])->exists();
      }
code: public function isMod($userId = null)
      {
          return (new Query())->from(Mod::tableName())->where(['forum_id' => $this->id, 'user_id' => $userId])->exists();
      }
code_tokens: public function isMod ( $ userId = null ) { return ( new Query ( ) ) -> from ( Mod :: tableName ( ) ) -> where ( [ 'forum_id' => $ this -> id , 'user_id' => $ userId ] ) -> exists ( ) ; }
docstring: Checks if user of given ID is moderator of this forum.
  @param int $userId
  @return bool
docstring_tokens: Checks if user of given ID is moderator of this forum .