original_string: private function getFiltered(bool $public = true): array
      {
          $result = [];
          foreach ($this->events as $event) {
              if ($event['is_public'] === $public) {
                  $result[] = $event;
              }
          }
          return $result;
      }
code: private function getFiltered(bool $public = true): array
      {
          $result = [];
          foreach ($this->events as $event) {
              if ($event['is_public'] === $public) {
                  $result[] = $event;
              }
          }
          return $result;
      }
code_tokens: private function getFiltered ( bool $ public = true ) : array { $ result = [ ] ; foreach ( $ this -> events as $ event ) { if ( $ event [ 'is_public' ] === $ public ) { $ result [ ] = $ event ; } } return $ result ; }
docstring: Returns array with events filtered by event's visibility
  
  @param bool $public
  @return array
docstring_tokens: Returns array with events filtered by event s visibility