AuraSqlPagerModule::configure()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 8
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 8
c 2
b 0
f 0
nc 1
nop 0
dl 0
loc 10
ccs 8
cts 8
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Ray\AuraSqlModule\Pagerfanta;
6
7
use Override;
8
use Pagerfanta\View\DefaultView;
9
use Pagerfanta\View\Template\DefaultTemplate;
10
use Pagerfanta\View\Template\TemplateInterface;
11
use Pagerfanta\View\ViewInterface;
12
use Ray\AuraSqlModule\Annotation\PagerViewOption;
13
use Ray\Di\AbstractModule;
14
15
final class AuraSqlPagerModule extends AbstractModule
16
{
17
    /**
18
     * {@inheritDoc}
19
     */
20
    #[Override]
21 12
    protected function configure(): void
22
    {
23 12
        $this->bind(ViewInterface::class)->to(DefaultView::class);
24 12
        $this->bind(TemplateInterface::class)->to(DefaultTemplate::class);
25 12
        $this->bind(AuraSqlPagerInterface::class)->to(AuraSqlPager::class);
26 12
        $this->bind(AuraSqlPagerFactoryInterface::class)->to(AuraSqlPagerFactory::class);
27 12
        $this->bind(AuraSqlQueryPagerFactoryInterface::class)->to(AuraSqlQueryPagerFactory::class);
28 12
        $this->bind(AuraSqlQueryPagerInterface::class)->to(AuraSqlQueryPager::class);
29 12
        $this->bind('')->annotatedWith(PagerViewOption::class)->toInstance([]);
30 12
    }
31
}
32