original_string: public static function create(array $properties, Direction $direction = null) : Sort
      {
          if ($direction === null) {
              $direction = Direction::$ASC;
          }
          $orders = [];
          foreach ($properties as $property) {
              $orders[] = new Order($direction, $property);
          }
          return new self($orders);
      }
code: public static function create(array $properties, Direction $direction = null) : Sort
      {
          if ($direction === null) {
              $direction = Direction::$ASC;
          }
          $orders = [];
          foreach ($properties as $property) {
              $orders[] = new Order($direction, $property);
          }
          return new self($orders);
      }
code_tokens: public static function create ( array $ properties , Direction $ direction = null ) : Sort { if ( $ direction === null ) { $ direction = Direction :: $ ASC ; } $ orders = [ ] ; foreach ( $ properties as $ property ) { $ orders [ ] = new Order ( $ direction , $ property ) ; } return new self ( $ orders ) ; }
docstring: Factory method to order by several properties with the same direction.
  
  @param array $properties
  @param Direction $direction
  @return Sort
docstring_tokens: Factory method to order by several properties with the same direction .