diff --git a/src/Generator/Schema.php b/src/Generator/Schema.php index 840b93a..0308e1d 100644 --- a/src/Generator/Schema.php +++ b/src/Generator/Schema.php @@ -51,7 +51,15 @@ public static function generate(string $name, string $namespace, string $classNa ); foreach ($schema->properties as $propertyName => $property) { - $propertyName = trim($propertyName, '@'); + $propertyName = str_replace([ + '@', + '+', + '-', + ], [ + '_AT_', + '_PLUSES_', + '_MINUS_', + ], $propertyName); $propertyStmt = $factory->property($propertyName)->makePrivate(); $docBlock = []; if (strlen($property->description) > 0) {