File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -147,14 +147,16 @@ public static function buildPropsArray($items, $schema) {
147
147
if (array_key_exists ($ key , $ schema ["properties " ]) && $ key != "attributes " ){
148
148
// Check the schema "type", skip over any that contain the value "array" or "object"
149
149
if (array_key_exists ("type " , $ schema ["properties " ][$ key ]) && self ::isAllowedSchemaType ($ schema ["properties " ][$ key ]["type " ])){
150
- // if (strpos($key, '_')) {
151
- // $ch = CaseHelperFactory::make(CaseHelperFactory::INPUT_TYPE_SNAKE_CASE);
152
- // } else {
153
- // $ch = CaseHelperFactory::make(CaseHelperFactory::INPUT_TYPE_CAMEL_CASE);
154
- // }
155
-
156
- // $props[$ch->toKebabCase($key)] = $value;
157
- $ props [$ key ] = $ value ;
150
+ if (strpos ($ key , '- ' )) {
151
+ $ props [$ key ] = $ value ;
152
+ } else {
153
+ if (strpos ($ key , '_ ' )) {
154
+ $ ch = CaseHelperFactory::make (CaseHelperFactory::INPUT_TYPE_SNAKE_CASE );
155
+ } else {
156
+ $ ch = CaseHelperFactory::make (CaseHelperFactory::INPUT_TYPE_CAMEL_CASE );
157
+ }
158
+ $ props [$ ch ->toKebabCase ($ key )] = $ value ;
159
+ }
158
160
}
159
161
}
160
162
}
You can’t perform that action at this time.
0 commit comments