PageMapperFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 5

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Page\Mapper;
6
7
use Interop\Container\ContainerInterface;
8
use Page\Entity\Page;
9
use Zend\Db\Adapter\Adapter;
10
use Zend\Db\ResultSet\HydratingResultSet;
11
use Zend\Hydrator\ArraySerializable;
12
13
class PageMapperFactory
14
{
15
    public function __invoke(ContainerInterface $container): PageMapper
16
    {
17
        $adapter = $container->get(Adapter::class);
18
        $resultSet = new HydratingResultSet(new ArraySerializable(), new Page());
19
20
        return new PageMapper($adapter, $resultSet);
21
    }
22
}
23