Test Setup Failed
Push — master ( 80a7cc...26b8e4 )
by Alexey
02:49
created

CommentFactory::createFromArray()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 22
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 12

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 22
ccs 0
cts 11
cp 0
rs 9.2
cc 3
eloc 13
nc 3
nop 1
crap 12
1
<?php
2
3
namespace Skobkin\Bundle\PointToolsBundle\Service\Factory\Blogs;
4
5
use Psr\Log\LoggerInterface;
6
use Skobkin\Bundle\PointToolsBundle\Repository\Blogs\CommentRepository;
7
use Skobkin\Bundle\PointToolsBundle\Repository\Blogs\PostRepository;
8
use Skobkin\Bundle\PointToolsBundle\Service\Factory\AbstractFactory;
9
use Skobkin\Bundle\PointToolsBundle\Service\Factory\UserFactory;
10
11
class CommentFactory extends AbstractFactory
12
{
13
    /**
14
     * @var CommentRepository
15
     */
16
    private $commentRepository;
17
18
    /**
19
     * @var PostRepository
20
     */
21
    private $postRepository;
22
23
    /**
24
     * @var UserFactory
25
     */
26
    private $userFactory;
27
28
29
    public function __construct(LoggerInterface $logger, CommentRepository $commentRepository, PostRepository $postRepository, UserFactory $userFactory)
30
    {
31
        parent::__construct($logger);
32
        $this->userFactory = $userFactory;
33
        $this->commentRepository = $commentRepository;
34
        $this->postRepository = $postRepository;
35
    }
36
}