original_string: public function determineChildrenSorting(HasMany $children)
      {
          if (in_array($this->children_order, $this->translatedAttributes))
          {
              $children->sortedBySourceAttribute(
                  $this->children_order,
                  $this->children_order_direction
              );
          } else
          {
              $children->orderBy(
                  $this->children_order, $this->children_order_direction
              );
          };
      }
code: public function determineChildrenSorting(HasMany $children)
      {
          if (in_array($this->children_order, $this->translatedAttributes))
          {
              $children->sortedBySourceAttribute(
                  $this->children_order,
                  $this->children_order_direction
              );
          } else
          {
              $children->orderBy(
                  $this->children_order, $this->children_order_direction
              );
          };
      }
code_tokens: public function determineChildrenSorting ( HasMany $ children ) { if ( in_array ( $ this -> children_order , $ this -> translatedAttributes ) ) { $ children -> sortedBySourceAttribute ( $ this -> children_order , $ this -> children_order_direction ) ; } else { $ children -> orderBy ( $ this -> children_order , $ this -> children_order_direction ) ; } ; }
docstring: Determines the children sorting
  
  @param HasMany $children
docstring_tokens: Determines the children sorting