Code Duplication    Length = 3-3 lines in 2 locations

modules/graphql_core/src/Plugin/GraphQL/Fields/EntityQuery/EntityQuery.php 2 locations

@@ 321-323 (lines=3) @@
318
      }
319
      // Unary operators need a single value.
320
      else if (!empty($operator) && $this->isUnaryOperator($operator)) {
321
        if (empty($value) || count($value) > 1) {
322
          throw new Error(sprintf("Unary operators must be associated with a single value (field '%s').", $field));
323
        }
324
325
        // Pick the first item from the values.
326
        $value = reset($value);
@@ 330-332 (lines=3) @@
327
      }
328
      // Range operators need exactly two values.
329
      else if (!empty($operator) && $this->isRangeOperator($operator)) {
330
        if (empty($value) || count($value) !== 2) {
331
          throw new Error(sprintf("Range operators must require exactly two values (field '%s').", $field));
332
        }
333
      }
334
      // Null operators can't have a value set.
335
      else if (!empty($operator) && $this->isNullOperator($operator)) {