Code Duplication    Length = 3-6 lines in 2 locations

src/Schema/Container.php 2 locations

@@ 90-95 (lines=6) @@
87
            ));
88
        }
89
90
        if ($this->hasProviderMapping($type) === true) {
91
            throw new InvalidArgumentException(T::t(
92
                'Type should not be used more than once to register a schema (\'%s\').',
93
                [$type]
94
            ));
95
        }
96
97
        $this->setProviderMapping($type, $schema);
98
    }
@@ 135-137 (lines=3) @@
132
            return $this->getCreatedProvider($type);
133
        }
134
135
        if ($this->hasProviderMapping($type) === false) {
136
            throw new InvalidArgumentException(T::t('Schema is not registered for type \'%s\'.', [$type]));
137
        }
138
139
        $classNameOrClosure = $this->getProviderMapping($type);
140
        if ($classNameOrClosure instanceof Closure) {