@@ -11,31 +11,31 @@ |
||
11 | 11 | class DatetimeMutation |
12 | 12 | { |
13 | 13 | |
14 | - /** |
|
15 | - * Maps the GraphQL input to a format that the model functions can use |
|
16 | - * |
|
17 | - * @param array $input Data coming from the GraphQL mutation query input |
|
18 | - * @return array |
|
19 | - */ |
|
20 | - public static function prepareFields(array $input) |
|
21 | - { |
|
14 | + /** |
|
15 | + * Maps the GraphQL input to a format that the model functions can use |
|
16 | + * |
|
17 | + * @param array $input Data coming from the GraphQL mutation query input |
|
18 | + * @return array |
|
19 | + */ |
|
20 | + public static function prepareFields(array $input) |
|
21 | + { |
|
22 | 22 | |
23 | - $args = []; |
|
23 | + $args = []; |
|
24 | 24 | |
25 | - if (! empty($input['event'])) { |
|
26 | - $args['EVT_ID'] = absint($input['event']); |
|
27 | - } |
|
25 | + if (! empty($input['event'])) { |
|
26 | + $args['EVT_ID'] = absint($input['event']); |
|
27 | + } |
|
28 | 28 | |
29 | - if (! empty($input['name'])) { |
|
30 | - $args['DTT_name'] = sanitize_text_field($input['name']); |
|
31 | - } |
|
29 | + if (! empty($input['name'])) { |
|
30 | + $args['DTT_name'] = sanitize_text_field($input['name']); |
|
31 | + } |
|
32 | 32 | |
33 | - if (! empty($input['description'])) { |
|
34 | - $args['DTT_description'] = sanitize_text_field($input['description']); |
|
35 | - } |
|
33 | + if (! empty($input['description'])) { |
|
34 | + $args['DTT_description'] = sanitize_text_field($input['description']); |
|
35 | + } |
|
36 | 36 | |
37 | - // Likewise the other fields... |
|
37 | + // Likewise the other fields... |
|
38 | 38 | |
39 | - return $args; |
|
40 | - } |
|
39 | + return $args; |
|
40 | + } |
|
41 | 41 | } |
@@ -22,15 +22,15 @@ |
||
22 | 22 | |
23 | 23 | $args = []; |
24 | 24 | |
25 | - if (! empty($input['event'])) { |
|
25 | + if ( ! empty($input['event'])) { |
|
26 | 26 | $args['EVT_ID'] = absint($input['event']); |
27 | 27 | } |
28 | 28 | |
29 | - if (! empty($input['name'])) { |
|
29 | + if ( ! empty($input['name'])) { |
|
30 | 30 | $args['DTT_name'] = sanitize_text_field($input['name']); |
31 | 31 | } |
32 | 32 | |
33 | - if (! empty($input['description'])) { |
|
33 | + if ( ! empty($input['description'])) { |
|
34 | 34 | $args['DTT_description'] = sanitize_text_field($input['description']); |
35 | 35 | } |
36 | 36 |