Code Duplication    Length = 12-12 lines in 2 locations

source/Spiral/Core/Container.php 2 locations

@@ 232-243 (lines=12) @@
229
     *
230
     * @return $this
231
     */
232
    public function bind($alias, $resolver)
233
    {
234
        if (is_array($resolver) || $resolver instanceof \Closure) {
235
            $this->bindings[$alias] = [$resolver, false];
236
237
            return $this;
238
        }
239
240
        $this->bindings[$alias] = $resolver;
241
242
        return $this;
243
    }
244
245
    /**
246
     * {@inheritdoc}
@@ 250-261 (lines=12) @@
247
     *
248
     * @return $this
249
     */
250
    public function bindSingleton($alias, $resolver)
251
    {
252
        if (is_object($resolver) && !$resolver instanceof \Closure) {
253
            $this->bindings[$alias] = $resolver;
254
255
            return $this;
256
        }
257
258
        $this->bindings[$alias] = [$resolver, true];
259
260
        return $this;
261
    }
262
263
    /**
264
     * {@inheritdoc}