Completed
Pull Request — master (#39)
by
unknown
02:27
created

ArticleRepositoryFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 7 1
1
<?php
2
3
namespace Admin\Factory\Model\Repository;
4
5
use Admin\Model\Storage\ArticleStorageInterface;
6
use Admin\Model\Repository\ArticleRepository;
7
use Interop\Container\ContainerInterface;
8
9
class ArticleRepositoryFactory
10
{
11
    /**
12
     * @param ContainerInterface $container
13
     * @return ArticleRepository
14
     */
15
    public function __invoke(ContainerInterface $container)
16
    {
17
        return new ArticleRepository(
18
            $container->get(ArticleStorageInterface::class),
19
            new \DateTime()
20
        );
21
    }
22
}
23