Code Duplication    Length = 15-15 lines in 2 locations

src/SphinxClient.php 2 locations

@@ 886-900 (lines=15) @@
883
884
    /// set range filter
885
    /// only match records if $attribute value is beetwen $min and $max (inclusive)
886
    public function setFilterRange($attribute, $min, $max, $exclude = false)
887
    {
888
        assert(is_string($attribute));
889
        assert(is_numeric($min));
890
        assert(is_numeric($max));
891
        assert($min <= $max);
892
893
        $this->filters[] = array(
894
            'type' => SPH_FILTER_RANGE,
895
            'attr' => $attribute,
896
            'exclude' => $exclude,
897
            'min' => $min,
898
            'max' => $max
899
        );
900
    }
901
902
    /// set float range filter
903
    /// only match records if $attribute value is beetwen $min and $max (inclusive)
@@ 904-918 (lines=15) @@
901
902
    /// set float range filter
903
    /// only match records if $attribute value is beetwen $min and $max (inclusive)
904
    public function setFilterFloatRange($attribute, $min, $max, $exclude = false)
905
    {
906
        assert(is_string($attribute));
907
        assert(is_float($min));
908
        assert(is_float($max));
909
        assert($min <= $max);
910
911
        $this->filters[] = array(
912
            'type' => SPH_FILTER_FLOATRANGE,
913
            'attr' => $attribute,
914
            'exclude' => $exclude,
915
            'min' => $min,
916
            'max' => $max
917
        );
918
    }
919
920
    /// setup anchor point for geosphere distance calculations
921
    /// required to use @geodist in filters and sorting