[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
|
<?php
|
||||||
|
|
||||||
use Symfony\Component\Yaml\Yaml;
|
use Symfony\Component\Yaml\Yaml;
|
||||||
@ -50,7 +50,7 @@ foreach ($files as $file) {
|
|||||||
$nullable = !@$schema['fields'][$field]['not null'] ? '?' : '';
|
$nullable = !@$schema['fields'][$field]['not null'] ? '?' : '';
|
||||||
$type = types[$schema['fields'][$field]['type']];
|
$type = types[$schema['fields'][$field]['type']];
|
||||||
$type = $type !== '' ? $nullable . $type : $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'];
|
$default = @$schema['fields'][$field]['default'];
|
||||||
|
|
||||||
if (isset($default) && $nullable != '?' && $type != 'DateTimeInterface') {
|
if (isset($default) && $nullable != '?' && $type != 'DateTimeInterface') {
|
||||||
@ -78,11 +78,9 @@ foreach ($files as $file) {
|
|||||||
$end = '// }}} Autocode';
|
$end = '// }}} Autocode';
|
||||||
$code = "
|
$code = "
|
||||||
{$begin}
|
{$begin}
|
||||||
|
|
||||||
{$fields_code}
|
{$fields_code}
|
||||||
|
|
||||||
{$methods_code}
|
{$methods_code}
|
||||||
|
|
||||||
{$end}";
|
{$end}";
|
||||||
|
|
||||||
foreach (['/\\//' => '\\/', '/ /' => '\\ '] as $from => $to) {
|
foreach (['/\\//' => '\\/', '/ /' => '\\ '] as $from => $to) {
|
||||||
|
Loading…
Reference in New Issue
Block a user