original_string: public function group($property, $separator = null)
      {
          $list = [];
  
          /** @var NestedObjectInterface $element */
          foreach ($this->getIterator() as $element) {
              $list[(string) $element->getNestedProperty($property, null, $separator)][] = $element;
          }
  
          return $list;
      }
code: public function group($property, $separator = null)
      {
          $list = [];
  
          /** @var NestedObjectInterface $element */
          foreach ($this->getIterator() as $element) {
              $list[(string) $element->getNestedProperty($property, null, $separator)][] = $element;
          }
  
          return $list;
      }
code_tokens: public function group ( $ property , $ separator = null ) { $ list = [ ] ; /** @var NestedObjectInterface $element */ foreach ( $ this -> getIterator ( ) as $ element ) { $ list [ ( string ) $ element -> getNestedProperty ( $ property , null , $ separator ) ] [ ] = $ element ; } return $ list ; }
docstring: Group items in the collection by a field.
  
  @param string $property      Object property to be used to make groups.
  @param string $separator     Separator, defaults to '.'
  @return array
docstring_tokens: Group items in the collection by a field .