Paraunit   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 7

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 7
dl 0
loc 20
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A createApplication() 0 12 1
A getVersion() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Paraunit\Bin;
6
7
use Jean85\PrettyVersions;
8
use Paraunit\Command\CoverageCommand;
9
use Paraunit\Command\ParallelCommand;
10
use Paraunit\Configuration\CoverageConfiguration;
11
use Paraunit\Configuration\ParallelConfiguration;
12
use Symfony\Component\Console\Application;
13
14
/**
15
 * Class Paraunit
16
 * @package Paraunit\Bin
17
 */
18
class Paraunit
19
{
20 1
    public static function createApplication(): Application
21
    {
22 1
        $application = new Application('Paraunit', self::getVersion());
23
24 1
        $parallelCommand = new ParallelCommand(new ParallelConfiguration());
25 1
        $application->add($parallelCommand);
26
27 1
        $coverageCommand = new CoverageCommand(new CoverageConfiguration());
28 1
        $application->add($coverageCommand);
29
30 1
        return $application;
31
    }
32
33 25
    public static function getVersion(): string
34
    {
35 25
        return PrettyVersions::getVersion('facile-it/paraunit')->getPrettyVersion();
36
    }
37
}
38