From c1be2616396b0b2cdd08c478bfec353d2d7038b8 Mon Sep 17 00:00:00 2001 From: Brian Moon Date: Mon, 21 Oct 2024 08:23:31 -0500 Subject: [PATCH] make names singular --- bin/create_objects.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/create_objects.php b/bin/create_objects.php index f0b143b..a9d0463 100755 --- a/bin/create_objects.php +++ b/bin/create_objects.php @@ -138,7 +138,9 @@ ]; } -$object_name = str_replace(' ', '', ucwords(str_replace('_', ' ', $opts['table']))); +$object_name = rtrim(str_replace(' ', '', ucwords(str_replace('_', ' ', $opts['table']))), 's'); + + create_value_object($properties, $opts['namespace'], $object_name, $opts['base-class'], $opts['schema'], $opts['table'], $opts['dir']); create_mapper($properties, $opts['namespace'], $object_name, $opts['base-class'], $opts['schema'], $opts['table'], $opts['dir'], $primary_key);