Skip to content

Commit 9856eef

Browse files
authored
Merge pull request #9 from c1rno/master
Fix incorrect object templating `stdClass::__set_state` -> `(object)`
2 parents 4645a1d + e0b8ad2 commit 9856eef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/PhpCode.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,11 @@ public static function makePhpConstantName($rawName)
125125
public static function varExport($value)
126126
{
127127
$result = var_export($value, 1);
128+
$result = str_replace("stdClass::__set_state", "(object)", $result);
128129
$result = str_replace("array (\n", "array(\n", $result);
129130
$result = str_replace(' ', ' ', $result);
130131
$result = str_replace("array(\n)", "array()", $result);
131132
return $result;
132133
}
133134

134-
}
135+
}

0 commit comments

Comments
 (0)