Code Duplication    Length = 3-3 lines in 2 locations

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

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