original_string: public static function generation(Collection $categories) : Collection
  	{
  		$ids = [];
  
  		foreach ($categories as $category) {
  			$ids[] = $category->id;
  			$ids[] = static::familyTree($category->childrenRecursive);
  		}
  
          return Collection::make($ids)->flatten()->unique()->sort();
  	}
code: public static function generation(Collection $categories) : Collection
  	{
  		$ids = [];
  
  		foreach ($categories as $category) {
  			$ids[] = $category->id;
  			$ids[] = static::familyTree($category->childrenRecursive);
  		}
  
          return Collection::make($ids)->flatten()->unique()->sort();
  	}
code_tokens: public static function generation ( Collection $ categories ) : Collection { $ ids = [ ] ; foreach ( $ categories as $ category ) { $ ids [ ] = $ category -> id ; $ ids [ ] = static :: familyTree ( $ category -> childrenRecursive ) ; } return Collection :: make ( $ ids ) -> flatten ( ) -> unique ( ) -> sort ( ) ; }
docstring: Returns the generation ids for the given categories.
  
  @param  Collection $categories
  @return array
docstring_tokens: Returns the generation ids for the given categories .