Bolt\Configuration\YamlUpdater::prepareValue PHP Method

prepareValue() public method

array('one', 'two', 'three') => [ one, two, three ] "usin' quotes" => 'usin'' quotes
public prepareValue ( string $value ) : string
$value string
return string
    public function prepareValue($value)
    {
        if (is_array($value)) {
            return '[ ' . implode(', ', $value) . ' ]';
        }
        if (preg_match('/[^a-z0-9]/i', $value)) {
            return "'" . str_replace("'", "''", $value) . "'";
        }
        return $value;
    }