Code Duplication    Length = 8-8 lines in 2 locations

lib/Elastica/Query/ConstantScore.php 1 location

@@ 48-55 (lines=8) @@
45
     *
46
     * @return $this
47
     */
48
    public function setQuery($query)
49
    {
50
        if (!is_array($query) && !($query instanceof AbstractQuery)) {
51
            throw new InvalidException('Invalid parameter. Has to be array or instance of Elastica\Query\AbstractQuery');
52
        }
53
54
        return $this->setParam('query', $query);
55
    }
56
57
    /**
58
     * Set boost.

lib/Elastica/Query/SpanMulti.php 1 location

@@ 50-57 (lines=8) @@
47
     *
48
     * @return $this
49
     */
50
    protected function _setQuery($type, $args)
51
    {
52
        if (!is_array($args) && !($args instanceof AbstractQuery)) {
53
            throw new InvalidException('Invalid parameter. Has to be array or instance of Elastica\Query\AbstractQuery');
54
        }
55
56
        return $this->setParam($type, $args);
57
    }
58
}
59