forked from GNUsocial/gnu-social
[TOOLS] Fix bin/generate_entity_fields
This commit is contained in:
parent
0508886fc4
commit
a60c79c35d
@ -1,5 +1,4 @@
|
||||
#!/usr/local/bin/php
|
||||
|
||||
<?php
|
||||
|
||||
use Symfony\Component\Yaml\Yaml;
|
||||
@ -55,7 +54,7 @@ foreach ($files as $file) {
|
||||
$method_name = str_replace(' ', '', ucwords(str_replace('_', ' ', $field)));
|
||||
$default = @$schema['fields'][$field]['default'];
|
||||
|
||||
if (isset($default) && $nullable != '?' && $type != '\DateTimeInterface') {
|
||||
if (isset($default) && $nullable != '?' && $type != 'DateTimeInterface') {
|
||||
if (is_string($default)) {
|
||||
$default = "'{$default}'";
|
||||
} elseif ($type == 'bool') {
|
||||
|
Loading…
Reference in New Issue
Block a user