PhpVersionTrait::getPhpVersion()   A
last analyzed

Complexity

Conditions 2
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
cc 2
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 3
cp 0
crap 6
rs 10
c 0
b 0
f 0
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