Total Complexity | 4 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
12 | class Dumper |
||
13 | { |
||
14 | /** |
||
15 | * Returns the components of a Version instance. |
||
16 | * |
||
17 | * @param Version $version A version. |
||
18 | * |
||
19 | * @return array The components. |
||
20 | */ |
||
21 | public static function toComponents(Version $version) |
||
22 | { |
||
23 | return [ |
||
24 | Parser::MAJOR => $version->getMajor(), |
||
25 | Parser::MINOR => $version->getMinor(), |
||
26 | Parser::PATCH => $version->getPatch(), |
||
27 | Parser::PRE_RELEASE => $version->getPreRelease(), |
||
28 | Parser::BUILD => $version->getBuild(), |
||
29 | ]; |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * Returns the string representation of a Version instance. |
||
34 | * |
||
35 | * @param Version $version A version. |
||
36 | * |
||
37 | * @return string The string representation. |
||
38 | */ |
||
39 | public static function toString(Version $version) |
||
52 | ); |
||
53 | } |
||
55 |