src/Type/ArrayType.php
public function sort($order = self::SORT_ASC, $type = self::SORT_REGULAR, $caseSensitive = true)
    {
        if ($caseSensitive === false) {
            $type = $type + SORT_FLAG_CASE;
        }
        if ($this->isAssociative() === true) {
            if ($order == self::SORT_ASC) {
                asort($this->arrayVar, $type);
            } else {
                var_dump($type);
                arsort($this->arrayVar, $type);
            }
        } else {
            if ($order == self::SORT_ASC) {
                sort($this->arrayVar, $type);
            } else {
                rsort($this->arrayVar, $type);
            }
        }
        return $this;
    }
public function sort($order = self::SORT_ASC, $type = self::SORT_REGULAR, $caseSensitive = true)
    {
        if ($caseSensitive === false) {
            $type = $type + SORT_FLAG_CASE;
        }
        if ($this->isAssociative() === true) {
            if ($order == self::SORT_ASC) {
                asort($this->arrayVar, $type);
            } else {
                var_dump($type);
                arsort($this->arrayVar, $type);
            }
        } else {
            if ($order == self::SORT_ASC) {
                sort($this->arrayVar, $type);
            } else {
                rsort($this->arrayVar, $type);
            }
        }
        return $this;
    }
public function sort ( $ order = self :: SORT_ASC , $ type = self :: SORT_REGULAR , $ caseSensitive = true ) { if ( $ caseSensitive === false ) { $ type = $ type + SORT_FLAG_CASE ; } if ( $ this -> isAssociative ( ) === true ) { if ( $ order == self :: SORT_ASC ) { asort ( $ this -> arrayVar , $ type ) ; } else { var_dump ( $ type ) ; arsort ( $ this -> arrayVar , $ type ) ; } } else { if ( $ order == self :: SORT_ASC ) { sort ( $ this -> arrayVar , $ type ) ; } else { rsort ( $ this -> arrayVar , $ type ) ; } } return $ this ; }
Sort an array by value

@since   1.1
@param   int  $order Sort order (SORT_ASC or SORT_DESC)
@param   int  $type Sort type (SORT_REGULAR, SORT_NUMERIC, SORT_STRING, SORT_LOCALE_STRING or SORT_NATURAL)
@param   bool $caseSensitive Define if sort is case sensitive
@return  $this Return current object
Sort an array by value