original_string: public function collectionGroup($property)
      {
          $collections = [];
          foreach ($this->group($property) as $id => $elements) {
              $collection = $this->createFrom($elements);
  
              $collections[$id] = $collection;
          }
  
          return $collections;
      }
code: public function collectionGroup($property)
      {
          $collections = [];
          foreach ($this->group($property) as $id => $elements) {
              $collection = $this->createFrom($elements);
  
              $collections[$id] = $collection;
          }
  
          return $collections;
      }
code_tokens: public function collectionGroup ( $ property ) { $ collections = [ ] ; foreach ( $ this -> group ( $ property ) as $ id => $ elements ) { $ collection = $ this -> createFrom ( $ elements ) ; $ collections [ $ id ] = $ collection ; } return $ collections ; }
docstring: Group items in the collection by a field and return them as associated array of collections.
  
  @param string $property
  @return static[]
docstring_tokens: Group items in the collection by a field and return them as associated array of collections .