PhpVersionTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 3
c 0
b 0
f 0
dl 0
loc 11
ccs 0
cts 3
cp 0
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A getPhpVersion() 0 4 2
1
<?php
2
3
/**
4
 * Copyright MediaCT. All rights reserved.
5
 * https://www.mediact.nl
6
 */
7
8
namespace Mediact\CodingStandard;
9
10
use PHP_CodeSniffer\Config;
11
12
trait PhpVersionTrait
13
{
14
    /**
15
     * Gets the PHP version.
16
     *
17
     * @return int
18
     */
19
    protected function getPhpVersion()
20
    {
21
        return Config::getConfigData('php_version')
0 ignored issues
show
Bug Best Practice introduced by
The expression return PHP_CodeSniffer\C...Standard\PHP_VERSION_ID also could return the type string which is incompatible with the documented return type integer.
Loading history...
22
            ?: PHP_VERSION_ID;
23
    }
24
}
25