Code Duplication    Length = 8-8 lines in 2 locations

core/db_models/fields/EE_Model_Field_Base.php 2 locations

@@ 577-584 (lines=8) @@
574
     */
575
    private function validateSchemaType($type)
576
    {
577
        if (! (is_string($type) || is_array($type))) {
578
            throw new InvalidArgumentException(
579
                sprintf(
580
                    esc_html__('The incoming argument (%s) must be a string or an array.', 'event_espresso'),
581
                    print_r($type, true)
582
                )
583
            );
584
        }
585
586
        //validate allowable types.
587
        //@link http://json-schema.org/latest/json-schema-core.html#rfc.section.4.2
@@ 626-633 (lines=8) @@
623
     */
624
    private function validateSchemaFormat($format)
625
    {
626
        if (! is_string($format)) {
627
            throw new InvalidArgumentException(
628
                sprintf(
629
                    esc_html__('The incoming argument (%s) must be a string.', 'event_espresso'),
630
                    print_r($format, true)
631
                )
632
            );
633
        }
634
635
        //validate allowable format values
636
        //@link http://json-schema.org/latest/json-schema-validation.html#rfc.section.7