public function sort($direction = \SORT_ASC, int $strategy = \SORT_REGULAR, bool $keepKeys = false): self
    {
        $this->generatorToArray();

        return $this->sorting(
            $this->array,
            $direction,
            $strategy,
            $keepKeys
        );
    }
public function sort($direction = \SORT_ASC, int $strategy = \SORT_REGULAR, bool $keepKeys = false): self
    {
        $this->generatorToArray();

        return $this->sorting(
            $this->array,
            $direction,
            $strategy,
            $keepKeys
        );
    }
public function sort ( $ direction = \ SORT_ASC , int $ strategy = \ SORT_REGULAR , bool $ keepKeys = false ) : self { $ this -> generatorToArray ( ) ; return $ this -> sorting ( $ this -> array , $ direction , $ strategy , $ keepKeys ) ; }
Sort the current array and optional you can keep the keys.

@param int|string $direction <p>use <strong>SORT_ASC</strong> (default) or <strong>SORT_DESC</strong></p>
@param int        $strategy  <p>sort_flags => use e.g.: <strong>SORT_REGULAR</strong> (default) or
<strong>SORT_NATURAL</strong></p>
@param bool       $keepKeys

@return static
<p>(Mutable) Return this Arrayy object.</p>
Sort the current array and optional you can keep the keys .