Completed
Push — master ( a05268...992047 )
by Scott
03:10
created

Version   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 2
dl 0
loc 16
ccs 6
cts 6
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A id() 0 4 1
A run() 0 6 1
1
<?php
2
namespace Desmond\functions\core;
3
use Desmond\Desmond;
4
use Desmond\functions\DesmondFunction;
5
use Desmond\ArgumentHelper;
6
7
class Version extends DesmondFunction
8
{
9
    use ArgumentHelper;
10
11 330
    public function id()
12
    {
13 330
        return 'version';
14
    }
15
16 1
    public function run(array $args)
17
    {
18 1
        $versionString = sprintf('Desmond %s, PHP %s.',
19 1
            Desmond::VERSION, phpversion());
20 1
        return $this->newReturnType('String', $versionString);
21
    }
22
}
23