Code Duplication    Length = 8-8 lines in 2 locations

src/Forms/Form.php 1 location

@@ 459-466 (lines=8) @@
456
        return $this;
457
    }
458
459
    public function castingHelper($field)
460
    {
461
        // Override casting for field message
462
        if (strcasecmp($field, 'Message') === 0 && ($helper = $this->getMessageCastingHelper())) {
463
            return $helper;
464
        }
465
        return parent::castingHelper($field);
466
    }
467
468
    /**
469
     * set up the default classes for the form. This is done on construct so that the default classes can be removed

src/Forms/FormField.php 1 location

@@ 908-915 (lines=8) @@
905
        return $form->getSecurityToken()->isEnabled();
906
    }
907
908
    public function castingHelper($field)
909
    {
910
        // Override casting for field message
911
        if (strcasecmp($field, 'Message') === 0 && ($helper = $this->getMessageCastingHelper())) {
912
            return $helper;
913
        }
914
        return parent::castingHelper($field);
915
    }
916
917
    /**
918
     * Set the custom error message to show instead of the default format.