Code Duplication    Length = 4-4 lines in 2 locations

code/models/fieldtypes/JSONText.php 2 locations

@@ 363-366 (lines=4) @@
360
            throw new JSONTextException($msg);
361
        }
362
363
        if ($isEx && !$this->isValidExpression($operator)) {
364
            $msg = 'JSON expression: ' . $operator . ' is invalid.';
365
            throw new JSONTextException($msg);
366
        }
367
368
        $validType = ($isEx ? self::JSONTEXT_QUERY_JSONPATH : self::JSONTEXT_QUERY_OPERATOR);
369
        if ($marshalled = $this->marshallQuery(func_get_args(), $validType)) {
@@ 440-443 (lines=4) @@
437
        if (!$expr) {
438
            $this->value = $value;
439
        } else {
440
            if (!$this->isValidExpression($expr)) {
441
                $msg = 'Invalid JSONPath expression: ' . $expr . ' passed to ' . __FUNCTION__;
442
                throw new JSONTextException($msg);
443
            }
444
            
445
            if (!$this->jsonStore->set($expr, $value)) {
446
                $msg = 'Failed to properly set custom data to the JSONStore in ' . __FUNCTION__;