Code Duplication    Length = 15-15 lines in 2 locations

src/SphinxClient.php 2 locations

@@ 845-859 (lines=15) @@
842
843
    /// set range filter
844
    /// only match records if $attribute value is beetwen $min and $max (inclusive)
845
    public function setFilterRange($attribute, $min, $max, $exclude = false)
846
    {
847
        assert(is_string($attribute));
848
        assert(is_numeric($min));
849
        assert(is_numeric($max));
850
        assert($min <= $max);
851
852
        $this->filters[] = array(
853
            'type' => SPH_FILTER_RANGE,
854
            'attr' => $attribute,
855
            'exclude' => $exclude,
856
            'min' => $min,
857
            'max' => $max
858
        );
859
    }
860
861
    /// set float range filter
862
    /// only match records if $attribute value is beetwen $min and $max (inclusive)
@@ 863-877 (lines=15) @@
860
861
    /// set float range filter
862
    /// only match records if $attribute value is beetwen $min and $max (inclusive)
863
    public function setFilterFloatRange($attribute, $min, $max, $exclude = false)
864
    {
865
        assert(is_string($attribute));
866
        assert(is_float($min));
867
        assert(is_float($max));
868
        assert($min <= $max);
869
870
        $this->filters[] = array(
871
            'type' => SPH_FILTER_FLOATRANGE,
872
            'attr' => $attribute,
873
            'exclude' => $exclude,
874
            'min' => $min,
875
            'max' => $max
876
        );
877
    }
878
879
    /// setup anchor point for geosphere distance calculations
880
    /// required to use @geodist in filters and sorting