protected function getSortsArray(array $sorts): array
    {
        $sortsArray = [];
        foreach ($sorts as $sort) {
            $sortsArray[] = ($sort->getOrder() === 'desc' ? '-' : '') . $sort->getField();
        }

        return $sortsArray;
    }
protected function getSortsArray(array $sorts): array
    {
        $sortsArray = [];
        foreach ($sorts as $sort) {
            $sortsArray[] = ($sort->getOrder() === 'desc' ? '-' : '') . $sort->getField();
        }

        return $sortsArray;
    }
protected function getSortsArray ( array $ sorts ) : array { $ sortsArray = [ ] ; foreach ( $ sorts as $ sort ) { $ sortsArray [ ] = ( $ sort -> getOrder ( ) === 'desc' ? '-' : '' ) . $ sort -> getField ( ) ; } return $ sortsArray ; }
Turn an array of sort objects into an array.

@param array $sorts
@return array
Turn an array of sort objects into an array .