We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58e904b commit 78c4f0aCopy full SHA for 78c4f0a
src/PhpGenerator/Helpers.php
@@ -39,7 +39,7 @@ public static function dump($var)
39
private static function _dump(&$var, $level = 0)
40
{
41
if ($var instanceof PhpLiteral) {
42
- return $var->value;
+ return (string) $var;
43
44
} elseif (is_float($var)) {
45
$var = var_export($var, TRUE);
src/PhpGenerator/PhpLiteral.php
@@ -23,12 +23,22 @@
23
class PhpLiteral
24
25
/** @var string */
26
- public $value = '';
+ private $value;
27
28
29
public function __construct($value)
30
31
$this->value = (string) $value;
32
}
33
34
+
35
36
+ /**
37
+ * @return string
38
+ */
+ public function __toString()
+ {
+ return $this->value;
+ }
0 commit comments