src/CfdiUtils/Nodes/NodesSorter.php
public function setOrder(array $names): bool
    {
        $order = array_flip($this->parseNames($names));
        if ($this->order === $order) {
            return false;
        }
        $this->order = $order;
        $this->count = count($order);
        return true;
    }
public function setOrder(array $names): bool
    {
        $order = array_flip($this->parseNames($names));
        if ($this->order === $order) {
            return false;
        }
        $this->order = $order;
        $this->count = count($order);
        return true;
    }
public function setOrder ( array $ names ) : bool { $ order = array_flip ( $ this -> parseNames ( $ names ) ) ; if ( $ this -> order === $ order ) { return false ; } $ this -> order = $ order ; $ this -> count = count ( $ order ) ; return true ; }
It takes only the unique string names and sort using the order of appearance
@param string[] $names
@return bool true if the new names list is different from previous
It takes only the unique string names and sort using the order of appearance