public function setCoordinate(Coordinate $coordinate)
    {
        $this->sortsBy = array_map(function (array $sortBy) use ($coordinate) {
            if (self::TYPE_DISTANCE === $sortBy['type']) {
                $sortBy['coordinate'] = $coordinate;
            }

            return $sortBy;
        }, $this->sortsBy);

        return $this;
    }
public function setCoordinate(Coordinate $coordinate)
    {
        $this->sortsBy = array_map(function (array $sortBy) use ($coordinate) {
            if (self::TYPE_DISTANCE === $sortBy['type']) {
                $sortBy['coordinate'] = $coordinate;
            }

            return $sortBy;
        }, $this->sortsBy);

        return $this;
    }
public function setCoordinate ( Coordinate $ coordinate ) { $ this -> sortsBy = array_map ( function ( array $ sortBy ) use ( $ coordinate ) { if ( self :: TYPE_DISTANCE === $ sortBy [ 'type' ] ) { $ sortBy [ 'coordinate' ] = $ coordinate ; } return $ sortBy ; } , $ this -> sortsBy ) ; return $ this ; }
Set coordinate.

@param Coordinate $coordinate

@return SortBy
Set coordinate .