Issues (30)

legacy/Container/Traits/DeprecatedMethodsTrait.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace Nip\Container\Legacy\Container\Traits;
4
5
/**
6
 * Trait DeprecatedMethodsTrait
7
 * @package Nip\Container\Legacy\Container\Traits
8
 */
9
trait DeprecatedMethodsTrait
10
{
11
12
    /**
13
     * Register a shared binding in the container.
14
     *
15
     * @param string|array $abstract
16
     * @param \Closure|string|null $concrete
17
     *
18
     * @return void
19
     * @deprecated Use new Share method instead
20
     */
21
    public function singleton($abstract, $concrete = null)
22
    {
23
        return $this->share($abstract, $concrete);
0 ignored issues
show
It seems like share() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

23
        return $this->/** @scrutinizer ignore-call */ share($abstract, $concrete);
Loading history...
24
    }
25
}
26