original_string: public function get_group(event_interface $event) {
          if (is_null($this->groups)) {
              $this->load_groups();
          }
  
          if ($group = $event->get_group()) {
              $groupid = $group->get('id');
              return isset($this->groups[$groupid]) ? $this->groups[$groupid] : null;
          } else {
              return null;
          }
      }
code: public function get_group(event_interface $event) {
          if (is_null($this->groups)) {
              $this->load_groups();
          }
  
          if ($group = $event->get_group()) {
              $groupid = $group->get('id');
              return isset($this->groups[$groupid]) ? $this->groups[$groupid] : null;
          } else {
              return null;
          }
      }
code_tokens: public function get_group ( event_interface $ event ) { if ( is_null ( $ this -> groups ) ) { $ this -> load_groups ( ) ; } if ( $ group = $ event -> get_group ( ) ) { $ groupid = $ group -> get ( 'id' ) ; return isset ( $ this -> groups [ $ groupid ] ) ? $ this -> groups [ $ groupid ] : null ; } else { return null ; } }
docstring: Get the related group object for a given event.
  
  @param event_interface $event The event object.
  @return stdClass|null
docstring_tokens: Get the related group object for a given event .