Code Duplication    Length = 12-12 lines in 2 locations

source/Spiral/Core/Container.php 2 locations

@@ 206-217 (lines=12) @@
203
     *
204
     * @return $this
205
     */
206
    public function bind($alias, $resolver)
207
    {
208
        if (is_array($resolver) || $resolver instanceof \Closure) {
209
            $this->bindings[$alias] = [$resolver, false];
210
211
            return $this;
212
        }
213
214
        $this->bindings[$alias] = $resolver;
215
216
        return $this;
217
    }
218
219
    /**
220
     * {@inheritdoc}
@@ 224-235 (lines=12) @@
221
     *
222
     * @return $this
223
     */
224
    public function bindSingleton($alias, $resolver)
225
    {
226
        if (is_object($resolver) && !$resolver instanceof \Closure) {
227
            $this->bindings[$alias] = $resolver;
228
229
            return $this;
230
        }
231
232
        $this->bindings[$alias] = [$resolver, true];
233
234
        return $this;
235
    }
236
237
    /**
238
     * {@inheritdoc}