Code Duplication    Length = 7-11 lines in 2 locations

core/libraries/rest_api/RestIncomingQueryParamMetadata.php 2 locations

@@ 489-499 (lines=11) @@
486
     * @param $operator
487
     * @return boolean
488
     */
489
    private function operatorIsNAry($operator)
490
    {
491
        $valueArray = $this->getQueryParamValue();
492
        return array_key_exists(
493
            $operator,
494
            $this->getContext()->getModel()->valid_in_style_operators()
495
        )
496
            && isset($valueArray[1])
497
            && is_array($valueArray[1])
498
            && !isset($valueArray[2]);
499
    }
500
501
    /**
502
     * Returns true if the operator accepts 3 arguments (eg "BETWEEN").
@@ 526-532 (lines=7) @@
523
     * @param $operator
524
     * @return boolean
525
     */
526
    private function operatorIsLike($operator)
527
    {
528
        $query_param_value = $this->getQueryParamValue();
529
        return array_key_exists($operator, $this->getContext()->getModel()->valid_like_style_operators())
530
            && isset($query_param_value[1])
531
            && !isset($query_param_value[2]);
532
    }
533
534
    /**
535
     * Returns true if the operator only takes one argument (eg it's like `IS NULL`).