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

CommentFactory::validateData()   B

Complexity

Conditions 8
Paths 3

Size

Total Lines 18
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 72

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 18
ccs 0
cts 9
cp 0
rs 7.7777
cc 8
eloc 11
nc 3
nop 1
crap 72
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
}