Completed
Push — develop ( 894c58...40c6b6 )
by greg
02:56
created

NextGameWidgetFactory   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
lcom 0
cbo 2
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 5 1
1
<?php
2
namespace PlaygroundGame\View\Helper;
3
4
use PlaygroundGame\View\Helper\NextGameWidget;
5
use Interop\Container\ContainerInterface;
6
7
class NextGameWidgetFactory
8
{
9
    /**
10
     * @param ContainerInterface $container
11
     * @param string $requestedName
0 ignored issues
show
Bug introduced by
There is no parameter named $requestedName. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
12
     * @param array|null $options
0 ignored issues
show
Bug introduced by
There is no parameter named $options. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
13
     * @return mixed
14
     */
15
    public function __invoke(ContainerInterface $container)
16
    {
17
        $gameService = $container->get(\PlaygroundGame\Service\Game::class);
18
        return new NextGameWidget($gameService);
19
    }
20
}