Completed
Push — master ( 286bf8...b61e2e )
by Alessandro
06:14
created

Paraunit::getVersion()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 0
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
declare(strict_types=1);
3
4
namespace Paraunit\Bin;
5
6
use PackageVersions\Versions;
7
use Paraunit\Command\CoverageCommand;
8
use Paraunit\Command\ParallelCommand;
9
use Paraunit\Configuration\CoverageConfiguration;
10
use Paraunit\Configuration\ParallelConfiguration;
11
use Symfony\Component\Console\Application;
12
13
/**
14
 * Class Paraunit
15
 * @package Paraunit\Bin
16
 */
17
class Paraunit
18
{
19 1
    public static function createApplication(): Application
20
    {
21 1
        $application = new Application('Paraunit', self::getVersion());
22
23 1
        $parallelCommand = new ParallelCommand(new ParallelConfiguration());
24 1
        $application->add($parallelCommand);
25
26 1
        $CoverageCommand = new CoverageCommand(new CoverageConfiguration());
27 1
        $application->add($CoverageCommand);
28
29 1
        return $application;
30
    }
31
32
    public static function getVersion(): string
33
    {
34
        return Versions::getVersion('facile-it/paraunit');
35
    }
36
}
37