original_string: public function is_admin($id_chat): ?bool
    {
      if ( $this->check() && ($chat = $this->info($id_chat)) && !$chat['blocked'] ){
        return (bool)$this->db->count('bbn_chats_users', [
          'id_chat' => $id_chat,
          'id_user' => $this->user->get_id(),
          'admin' => 1
        ]);
      }
      return null;
    }
code: public function is_admin($id_chat): ?bool
    {
      if ( $this->check() && ($chat = $this->info($id_chat)) && !$chat['blocked'] ){
        return (bool)$this->db->count('bbn_chats_users', [
          'id_chat' => $id_chat,
          'id_user' => $this->user->get_id(),
          'admin' => 1
        ]);
      }
      return null;
    }
code_tokens: public function is_admin ( $ id_chat ) : ? bool { if ( $ this -> check ( ) && ( $ chat = $ this -> info ( $ id_chat ) ) && ! $ chat [ 'blocked' ] ) { return ( bool ) $ this -> db -> count ( 'bbn_chats_users' , [ 'id_chat' => $ id_chat , 'id_user' => $ this -> user -> get_id ( ) , 'admin' => 1 ] ) ; } return null ; }
docstring: Checks whether the current user is an admin of the given chat or not.
  
  @param $id_chat
  @return bool|null
docstring_tokens: Checks whether the current user is an admin of the given chat or not .