original_string: public function sort(
          array $defaultOrder,
          array $controlsOrder = null,
          array $metaOrder = null,
          array $errorOrder = null
      ) {
          if (!in_array('{data}', $defaultOrder)) {
              throw new \InvalidArgumentException('Placeholder "{data}" not listed in $defaultOrder');
  
          } elseif ($controlsOrder && !in_array('{data}', $controlsOrder)) {
              throw new \InvalidArgumentException('Placeholder "{data}" not listed in $controlsOrder');
  
          } elseif ($metaOrder && !in_array('{data}', $metaOrder)) {
              throw new \InvalidArgumentException('Placeholder "{data}" not listed in $metaOrder');
  
          } elseif ($errorOrder && !in_array('{data}', $errorOrder)) {
              throw new \InvalidArgumentException('Placeholder "{data}" not listed in $errorOrder');
          }
  
          $controlsOrder || $controlsOrder = $defaultOrder;
          $metaOrder || $metaOrder = $defaultOrder;
          $errorOrder || $errorOrder = $defaultOrder;
  
          $this->applySort('', $defaultOrder, $controlsOrder, $metaOrder, $errorOrder);
  
          return $this;
      }
code: public function sort(
          array $defaultOrder,
          array $controlsOrder = null,
          array $metaOrder = null,
          array $errorOrder = null
      ) {
          if (!in_array('{data}', $defaultOrder)) {
              throw new \InvalidArgumentException('Placeholder "{data}" not listed in $defaultOrder');
  
          } elseif ($controlsOrder && !in_array('{data}', $controlsOrder)) {
              throw new \InvalidArgumentException('Placeholder "{data}" not listed in $controlsOrder');
  
          } elseif ($metaOrder && !in_array('{data}', $metaOrder)) {
              throw new \InvalidArgumentException('Placeholder "{data}" not listed in $metaOrder');
  
          } elseif ($errorOrder && !in_array('{data}', $errorOrder)) {
              throw new \InvalidArgumentException('Placeholder "{data}" not listed in $errorOrder');
          }
  
          $controlsOrder || $controlsOrder = $defaultOrder;
          $metaOrder || $metaOrder = $defaultOrder;
          $errorOrder || $errorOrder = $defaultOrder;
  
          $this->applySort('', $defaultOrder, $controlsOrder, $metaOrder, $errorOrder);
  
          return $this;
      }
code_tokens: public function sort ( array $ defaultOrder , array $ controlsOrder = null , array $ metaOrder = null , array $ errorOrder = null ) { if ( ! in_array ( '{data}' , $ defaultOrder ) ) { throw new \ InvalidArgumentException ( 'Placeholder "{data}" not listed in $defaultOrder' ) ; } elseif ( $ controlsOrder && ! in_array ( '{data}' , $ controlsOrder ) ) { throw new \ InvalidArgumentException ( 'Placeholder "{data}" not listed in $controlsOrder' ) ; } elseif ( $ metaOrder && ! in_array ( '{data}' , $ metaOrder ) ) { throw new \ InvalidArgumentException ( 'Placeholder "{data}" not listed in $metaOrder' ) ; } elseif ( $ errorOrder && ! in_array ( '{data}' , $ errorOrder ) ) { throw new \ InvalidArgumentException ( 'Placeholder "{data}" not listed in $errorOrder' ) ; } $ controlsOrder || $ controlsOrder = $ defaultOrder ; $ metaOrder || $ metaOrder = $ defaultOrder ; $ errorOrder || $ errorOrder = $ defaultOrder ; $ this -> applySort ( '' , $ defaultOrder , $ controlsOrder , $ metaOrder , $ errorOrder ) ; return $ this ; }
docstring: This method allows an object's properties to be sorted according to an arbitrary sequence of properties. This
  is useful for standardizing the sequence of properties across several documents and for keeping the more
  important properties higher up.
  
  @param array $defaultOrder Preferred order of property names. Can include any Mason or custom property.
  Ordering will be applied at all levels within the document. Properties that are not found
  at a given level are gracefully ignored. Must include an element named "{data}". This is
  where all unspecified properties will be placed. All such properties will maintain the
  same order as  they had before sorting.
  @return $this
docstring_tokens: This method allows an object s properties to be sorted according to an arbitrary sequence of properties . This is useful for standardizing the sequence of properties across several documents and for keeping the more important properties higher up .