public function byValue(array $value): SortBy
    {
        if (
            self::SCORE !== $value &&
            self::RANDOM !== $value
        ) {
            $value['type'] = $value['type'] ?? self::TYPE_FIELD;
        }

        $this->sortsBy[] = $value;

        return $this;
    }
public function byValue(array $value): SortBy
    {
        if (
            self::SCORE !== $value &&
            self::RANDOM !== $value
        ) {
            $value['type'] = $value['type'] ?? self::TYPE_FIELD;
        }

        $this->sortsBy[] = $value;

        return $this;
    }
public function byValue ( array $ value ) : SortBy { if ( self :: SCORE !== $ value && self :: RANDOM !== $ value ) { $ value [ 'type' ] = $ value [ 'type' ] ?? self :: TYPE_FIELD ; } $ this -> sortsBy [ ] = $ value ; return $ this ; }
Sort by value.

@param array $value

@return SortBy
Sort by value .