Passed
Pull Request — 1.x (#346)
by Akihito
01:46
created

DataLoaderModule   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A configure() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BEAR\Resource\Module;
6
7
use BEAR\Resource\DataLoader\DataLoaderFactory;
8
use BEAR\Resource\DataLoader\DataLoaderFactoryInterface;
9
use BEAR\Resource\DataLoader\DataLoaderProcessor;
10
use Override;
11
use Ray\Di\AbstractModule;
12
13
/**
14
 * Provides DataLoader support for Crawl N+1 problem resolution
15
 *
16
 * Install this module to enable DataLoader functionality that batches
17
 * multiple resource requests into a single operation during link crawling.
18
 */
19
final class DataLoaderModule extends AbstractModule
20
{
21
    #[Override]
22
    protected function configure(): void
23
    {
24
        $this->bind(DataLoaderFactoryInterface::class)->to(DataLoaderFactory::class);
25
        $this->bind(DataLoaderProcessor::class);
26
    }
27
}
28