Passed
Push — master ( 3eb4db...99d5ff )
by Kirill
03:12
created

SampleBoot   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 5
c 1
b 0
f 0
dl 0
loc 10
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A boot() 0 3 1
1
<?php
2
3
/**
4
 * Spiral Framework.
5
 *
6
 * @license   MIT
7
 * @author    Anton Titov (Wolfy-J)
8
 */
9
10
declare(strict_types=1);
11
12
namespace Spiral\Tests\Boot\Fixtures;
13
14
use Spiral\Boot\Bootloader\Bootloader;
15
use Spiral\Core\BinderInterface;
16
17
class SampleBoot extends Bootloader
18
{
19
    public const BOOT = true;
20
21
    public const BINDINGS   = ['abc' => self::class];
22
    public const SINGLETONS = ['single' => self::class];
23
24
    public function boot(BinderInterface $binder): void
25
    {
26
        $binder->bind('cde', new SampleClass());
0 ignored issues
show
Bug introduced by
new Spiral\Tests\Boot\Fixtures\SampleClass() of type Spiral\Tests\Boot\Fixtures\SampleClass is incompatible with the type array|callable|string expected by parameter $resolver of Spiral\Core\BinderInterface::bind(). ( Ignorable by Annotation )

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

26
        $binder->bind('cde', /** @scrutinizer ignore-type */ new SampleClass());
Loading history...
27
    }
28
}
29