VideosActionFactory::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 8
Ratio 100 %

Importance

Changes 0
Metric Value
dl 8
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Web\Factory\Action;
6
7
use Article\Service\VideoService;
8
use Category\Service\CategoryService;
9
use Interop\Container\ContainerInterface;
10
use Web\Action\VideosAction;
11
use Zend\Expressive\Template\TemplateRendererInterface;
12
13
/**
14
 * Class VideosActionFactory.
15
 */
16
class VideosActionFactory
17
{
18
    /**
19
     * @param ContainerInterface $container
20
     *
21
     * @return VideosAction
22
     */
23 View Code Duplication
    public function __invoke(ContainerInterface $container): VideosAction
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
24
    {
25
        return new VideosAction(
26
            $container->get(TemplateRendererInterface::class),
27
            $container->get(VideoService::class),
28
            $container->get(CategoryService::class)
29
        );
30
    }
31
}
32