src/Jackiedo/DotenvEditor/DotenvFormatter.php
public function formatSetterLine($key, $value = null, $comment = null, $export = false)
    {
        $forceQuotes = (strlen($comment) > 0 && strlen(trim($value)) == 0);
        $value       = $this->formatValue($value, $forceQuotes);
        $key         = $this->formatKey($key);
        $comment     = $this->formatComment($comment);
        $export      = $export ? 'export ' : '';

        $line = "{$export}{$key}={$value}{$comment}";

        return $line;
    }
public function formatSetterLine($key, $value = null, $comment = null, $export = false)
    {
        $forceQuotes = (strlen($comment) > 0 && strlen(trim($value)) == 0);
        $value       = $this->formatValue($value, $forceQuotes);
        $key         = $this->formatKey($key);
        $comment     = $this->formatComment($comment);
        $export      = $export ? 'export ' : '';

        $line = "{$export}{$key}={$value}{$comment}";

        return $line;
    }
public function formatSetterLine ( $ key , $ value = null , $ comment = null , $ export = false ) { $ forceQuotes = ( strlen ( $ comment ) > 0 && strlen ( trim ( $ value ) ) == 0 ) ; $ value = $ this -> formatValue ( $ value , $ forceQuotes ) ; $ key = $ this -> formatKey ( $ key ) ; $ comment = $ this -> formatComment ( $ comment ) ; $ export = $ export ? 'export ' : '' ; $ line = "{$export}{$key}={$value}{$comment}" ; return $ line ; }
Build an setter line from the individual components for writing

@param string        $key
@param string|null   $value
@param string|null   $comment optional
@param bool          $export optional

@return string
Build an setter line from the individual components for writing