Failed Conditions
Pull Request — master (#707)
by Jonathan
03:12
created

Factory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 21
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A createVersion() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Migrations\Version;
6
7
use Doctrine\Migrations\Configuration\Configuration;
8
use Doctrine\Migrations\internal;
0 ignored issues
show
Bug introduced by
The type Doctrine\Migrations\internal was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
10
/**
11
 * @var internal
12
 */
13
class Factory
14
{
15
    /** @var Configuration */
16
    private $configuration;
17
18
    /** @var ExecutorInterface */
19
    private $versionExecutor;
20
21 146
    public function __construct(Configuration $configuration, ExecutorInterface $versionExecutor)
22
    {
23 146
        $this->configuration   = $configuration;
24 146
        $this->versionExecutor = $versionExecutor;
25 146
    }
26
27 73
    public function createVersion(string $version, string $migrationClassName) : Version
28
    {
29 73
        return new Version(
30 73
            $this->configuration,
31 73
            $version,
32 73
            $migrationClassName,
33 73
            $this->versionExecutor
34
        );
35
    }
36
}
37