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

Exporter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 2
c 1
b 0
f 0
dl 0
loc 10
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A exportVar() 0 3 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