Completed
Push — master ( 922e61...fe7e59 )
by Marco
10s
created

Versions   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getVersion() 0 4 1
1
<?php
2
3
namespace PackageVersions;
4
5
/**
6
 * This is a stub class: it is in place only for scenarios where PackageVersions
7
 * is installed with a `--no-scripts` flag, in which scenarios the Versions class
8
 * is not being replaced.
9
 *
10
 * If you are reading this docBlock inside your `vendor/` dir, then this means
11
 * that PackageVersions didn't correctly install, and is in "fallback" mode.
12
 */
13
final class Versions
14
{
15
    const VERSIONS = [];
16
17
    private function __construct()
18
    {
19
    }
20
21
    /**
22
     * @throws \OutOfBoundsException if a version cannot be located
23
     * @throws \UnexpectedValueException if the composer.lock file could not be located
24
     */
25
    public static function getVersion(string $packageName) : string
26
    {
27
        return FallbackVersions::getVersion($packageName);
28
    }
29
}
30