[TOOLS] Use GSActor rather than Gsactor in autogenerated code
This commit is contained in:
parent
460712e15e
commit
b27bda6a7c
@ -1,4 +1,4 @@
|
||||
#!/usr/local/bin/php
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
use Symfony\Component\Yaml\Yaml;
|
||||
@ -50,7 +50,7 @@ foreach ($files as $file) {
|
||||
$nullable = !@$schema['fields'][$field]['not null'] ? '?' : '';
|
||||
$type = types[$schema['fields'][$field]['type']];
|
||||
$type = $type !== '' ? $nullable . $type : $type;
|
||||
$method_name = str_replace(' ', '', ucwords(str_replace('_', ' ', $field)));
|
||||
$method_name = str_replace([' ', 'Gsactor'], ['', 'GSActor'], ucwords(str_replace('_', ' ', $field)));
|
||||
$default = @$schema['fields'][$field]['default'];
|
||||
|
||||
if (isset($default) && $nullable != '?' && $type != 'DateTimeInterface') {
|
||||
@ -78,11 +78,9 @@ foreach ($files as $file) {
|
||||
$end = '// }}} Autocode';
|
||||
$code = "
|
||||
{$begin}
|
||||
|
||||
{$fields_code}
|
||||
|
||||
{$methods_code}
|
||||
|
||||
{$end}";
|
||||
|
||||
foreach (['/\\//' => '\\/', '/ /' => '\\ '] as $from => $to) {
|
||||
|
Loading…
Reference in New Issue
Block a user