Code Duplication    Length = 8-8 lines in 2 locations

src/Config.php 1 location

@@ 81-88 (lines=8) @@
78
        $this->validator = $validator;
79
80
        // Make sure $config is either a string or array.
81
        if (! (is_string($config) || is_array($config))) {
82
            throw new InvalidArgumentException(
83
                sprintf(
84
                    _('Invalid configuration source: %1$s'),
85
                    print_r($config, true)
86
                )
87
            );
88
        }
89
90
        if (is_string($config)) {
91
            $config = $this->fetchArrayData($config);

src/ConfigSchema.php 1 location

@@ 66-73 (lines=8) @@
63
            $schema = $schema->getArrayCopy();
64
        }
65
66
        if (! is_array($schema)) {
67
            throw new InvalidArgumentException(
68
                sprintf(
69
                    _('Invalid schema source: %1$s'),
70
                    print_r($schema, true)
71
                )
72
            );
73
        }
74
75
        array_walk($schema, [$this, 'parseSchema']);
76
    }