Test Failed
Pull Request — master (#124)
by Andrii
14:47
created

Exporter::exportVar()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Composer\Config\Util;
6
7
use Yiisoft\VarDumper\VarDumper;
8
9
/**
10
 * Exporter is a thin wrapper for actual exporting implementation.
11
 * This class should be kept to allow change implementation easily.
12
 */
13
class Exporter
14
{
15
    /**
16
     * Returns PHP-executable string representation of given value.
17
     * @param mixed $value
18
     * @return string
19
     */
20
    public static function exportVar($value): string
21
    {
22
        return VarDumper::create($value)->asPhpString();
23
    }
24
}
25