Code Duplication    Length = 3-3 lines in 2 locations

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

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