Completed
Pull Request — 2.x (#4569)
by Scott Kingsley
04:56
created

PodsField   B

Complexity

Total Complexity 48

Size/Duplication

Total Lines 785
Duplicated Lines 0 %

Coupling/Cohesion

Components 3
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 785
rs 8
c 0
b 0
f 0
wmc 48
lcom 3
cbo 1

31 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A setup() 0 4 1
A admin_init() 0 4 1
B options() 0 44 1
A ui_options() 0 5 1
A schema() 0 7 1
A prepare() 0 7 1
A is_empty() 0 15 3
B values_are_empty() 0 25 6
A value() 0 5 1
A display() 0 5 1
A format() 0 5 1
B input() 0 25 2
A render_input_script() 0 14 2
A build_dfv_field_data() 0 48 1
A build_dfv_field_options() 0 5 1
A build_dfv_field_attributes() 0 5 1
A build_dfv_field_config() 0 11 1
A build_dfv_field_item_data() 0 11 3
A data() 0 5 1
A regex() 0 5 1
A validate() 0 5 1
A pre_save() 0 5 1
A save() 0 5 1
A post_save() 0 4 1
A pre_delete() 0 4 1
A delete() 0 4 1
A post_delete() 0 4 1
A ui() 0 5 1
C strip_html() 0 42 7
A __set_state() 0 5 1

How to fix   Complexity   

Complex Class

Complex classes like PodsField often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.

Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.

While breaking up the class, it is a good idea to analyze how other classes use PodsField, and based on these observations, apply Extract Interface, too.

1
<?php
2
3
/**
4
 * Pods Field class for common type-specific methods.
5
 *
6
 * @package Pods
7
 */
8
class PodsField {
9
10
	/**
11
	 * Whether this field is running under 1.x deprecated forms
12
	 *
13
	 * @var bool
14
	 * @since 2.0
15
	 */
16
	public static $deprecated = false;
17
18
	/**
19
	 * Field Type Identifier
20
	 *
21
	 * @var string
22
	 * @since 2.0
23
	 */
24
	public static $type = 'text';
25
26
	/**
27
	 * Field Type Label
28
	 *
29
	 * @var string
30
	 * @since 2.0
31
	 */
32
	public static $label = 'Unknown';
33
34
	/**
35
	 * Field Type Preparation
36
	 *
37
	 * @var string
38
	 * @since 2.0
39
	 */
40
	public static $prepare = '%s';
41
42
	/**
43
	 * Pod Types supported on (true for all, false for none, or give array of specific types supported)
44
	 *
45
	 * @var array|bool
46
	 * @since 2.1
47
	 */
48
	public static $pod_types = true;
49
50
	/**
51
	 * API caching for fields that need it during validate/save
52
	 *
53
	 * @var \PodsAPI
54
	 * @since 2.3
55
	 */
56
	private static $api;
0 ignored issues
show
Unused Code introduced by
The property $api is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
57
58
	/**
59
	 * Initial setup of class object.
60
	 *
61
	 * @since 2.0
62
	 */
63
	public function __construct() {
64
65
		// Run any setup needed.
66
		$this->setup();
67
	}
68
69
	/**
70
	 * Do things like register/enqueue scripts+stylesheets, set labels, etc.
71
	 *
72
	 * @since 2.7.2
73
	 */
74
	public function setup() {
75
76
		// Subclasses utilize this method if needed.
77
	}
78
79
	/**
80
	 * Add admin_init actions.
81
	 *
82
	 * @since 2.3
83
	 */
84
	public function admin_init() {
85
86
		// Add admin actions here.
87
	}
88
89
	/**
90
	 * Add options and set defaults for field type, shows in admin area
91
	 *
92
	 * @return array $options
93
	 *
94
	 * @since 2.0
95
	 * @see   PodsField::ui_options
96
	 */
97
	public function options() {
98
99
		$options = array(/*
0 ignored issues
show
Unused Code Comprehensibility introduced by
42% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
100
            'option_name' => array(
101
                'label' => 'Option Label',
102
                'depends-on' => array( 'another_option' => 'specific-value' ),
103
                'default' => 'default-value',
104
                'type' => 'field_type',
105
                'data' => array(
106
                    'value1' => 'Label 1',
107
108
                    // Group your options together
109
                    'Option Group' => array(
110
                        'gvalue1' => 'Option Label 1',
111
                        'gvalue2' => 'Option Label 2'
112
                    ),
113
114
                    // below is only if the option_name above is the "{$fieldtype}_format_type"
115
                    'value2' => array(
116
                        'label' => 'Label 2',
117
                        'regex' => '[a-zA-Z]' // Uses JS regex validation for the value saved if this option selected
118
                    )
119
                ),
120
121
                // below is only for a boolean group
122
                'group' => array(
123
                    'option_boolean1' => array(
124
                        'label' => 'Option boolean 1?',
125
                        'default' => 1,
126
                        'type' => 'boolean'
127
                    ),
128
                    'option_boolean2' => array(
129
                        'label' => 'Option boolean 2?',
130
                        'default' => 0,
131
                        'type' => 'boolean'
132
                    )
133
                )
134
            )
135
            */
136
		);
137
138
		return $options;
139
140
	}
141
142
	/**
143
	 * Options for the Admin area, defaults to $this->options()
144
	 *
145
	 * @return array $options
146
	 *
147
	 * @since 2.0
148
	 * @see   PodsField::options
149
	 */
150
	public function ui_options() {
151
152
		return $this->options();
153
154
	}
155
156
	/**
157
	 * Define the current field's schema for DB table storage
158
	 *
159
	 * @param array|null $options
160
	 *
161
	 * @return string
162
	 *
163
	 * @since 2.0
164
	 */
165
	public function schema( $options = null ) {
166
167
		$schema = 'VARCHAR(255)';
168
169
		return $schema;
170
171
	}
172
173
	/**
174
	 * Define the current field's preparation for sprintf
175
	 *
176
	 * @param array|null $options
177
	 *
178
	 * @return string
179
	 *
180
	 * @since 2.0
181
	 */
182
	public function prepare( $options = null ) {
183
184
		$format = self::$prepare;
185
186
		return $format;
187
188
	}
189
190
	/**
191
	 * Check if the field is empty.
192
	 *
193
	 * @param mixed $value Field value.
194
	 *
195
	 * @return bool
196
	 *
197
	 * @since 2.7
198
	 */
199
	public function is_empty( $value ) {
200
201
		$is_empty = false;
202
203
		if ( is_string( $value ) ) {
204
			$value = trim( $value );
205
		}
206
207
		if ( empty( $value ) ) {
208
			$is_empty = true;
209
		}
210
211
		return $is_empty;
212
213
	}
214
215
	/**
216
	 * Check if the field values are empty.
217
	 *
218
	 * @param array|mixed $values Field values.
219
	 * @param boolean     $strict Whether to check if any of the values are non-empty in an array.
220
	 *
221
	 * @return bool
222
	 *
223
	 * @since 2.7
224
	 */
225
	public function values_are_empty( $values, $strict = true ) {
226
227
		$is_empty = false;
228
229
		if ( is_array( $values ) ) {
230
			if ( $strict ) {
231
				foreach ( $values as $value ) {
232
					$is_empty = true;
233
234
					if ( ! $this->is_empty( $value ) ) {
235
						$is_empty = false;
236
237
						break;
238
					}
239
				}
240
			} elseif ( empty( $values ) ) {
241
				$is_empty = true;
242
			}
243
		} else {
244
			$is_empty = $this->is_empty( $values );
245
		}
246
247
		return $is_empty;
248
249
	}
250
251
	/**
252
	 * Change the value of the field
253
	 *
254
	 * @param mixed|null  $value
255
	 * @param string|null $name
256
	 * @param array|null  $options
257
	 * @param array|null  $pod
258
	 * @param int|null    $id
259
	 *
260
	 * @return mixed|null|string
261
	 *
262
	 * @since 2.3
263
	 */
264
	public function value( $value = null, $name = null, $options = null, $pod = null, $id = null ) {
265
266
		return $value;
267
268
	}
269
270
	/**
271
	 * Change the way the value of the field is displayed with Pods::get
272
	 *
273
	 * @param mixed|null  $value
274
	 * @param string|null $name
275
	 * @param array|null  $options
276
	 * @param array|null  $pod
277
	 * @param int|null    $id
278
	 *
279
	 * @return mixed|null|string
280
	 *
281
	 * @since 2.0
282
	 */
283
	public function display( $value = null, $name = null, $options = null, $pod = null, $id = null ) {
284
285
		return $value;
286
287
	}
288
289
	/**
290
	 * Reformat a number to the way the value of the field is displayed.
291
	 *
292
	 * @param mixed  $value
293
	 * @param string $name
294
	 * @param array  $options
295
	 * @param array  $pod
296
	 * @param int    $id
297
	 *
298
	 * @return string|null
299
	 * @since 2.0
300
	 */
301
	public function format( $value = null, $name = null, $options = null, $pod = null, $id = null ) {
302
303
		return $value;
304
305
	}
306
307
	/**
308
	 * Customize output of the form field
309
	 *
310
	 * @param string     $name
311
	 * @param mixed|null $value
312
	 * @param array|null $options
313
	 * @param array|null $pod
314
	 * @param int|null   $id
315
	 *
316
	 * @since 2.0
317
	 */
318
	public function input( $name, $value = null, $options = null, $pod = null, $id = null ) {
319
320
		$options = (array) $options;
321
322
		$form_field_type = PodsForm::$field_type;
323
324
		if ( is_array( $value ) ) {
325
			$value = implode( ' ', $value );
326
		}
327
328
		pods_view( PODS_DIR . 'ui/fields/text.php', compact( array_keys( get_defined_vars() ) ) );
329
330
		return;
331
332
		// @todo Eventually use this code
333
		$options = (array) $options;
0 ignored issues
show
Unused Code introduced by
$options = (array) $options; does not seem to be reachable.

This check looks for unreachable code. It uses sophisticated control flow analysis techniques to find statements which will never be executed.

Unreachable code is most often the result of return, die or exit statements that have been added for debug purposes.

function fx() {
    try {
        doSomething();
        return true;
    }
    catch (\Exception $e) {
        return false;
    }

    return false;
}

In the above example, the last return false will never be executed, because a return statement has already been met in every possible execution path.

Loading history...
334
335
		$type = pods_v( 'type', $options, static::$type );
336
337
		$args = compact( array_keys( get_defined_vars() ) );
338
		$args = (object) $args;
339
340
		$this->render_input_script( $args );
341
342
	}
343
344
	/**
345
	 * Render input script for Pods DFV
346
	 *
347
	 * @param array|object $args    {
348
	 *                              Field information arguments.
349
	 *
350
	 * @type string        $name    Field name
351
	 * @type string        $type    Field type
352
	 * @type array         $options Field options
353
	 * @type mixed         $value   Current value
354
	 * @type array         $pod     Pod information
355
	 * @type int|string    $id      Current item ID
356
	 * }
357
	 */
358
	public function render_input_script( $args ) {
359
360
		if ( is_array( $args ) ) {
361
			$args = (object) $args;
362
		}
363
364
		$script_content = json_encode( $this->build_dfv_field_data( $args ), JSON_HEX_TAG );
0 ignored issues
show
Unused Code introduced by
The call to json_encode() has too many arguments starting with JSON_HEX_TAG.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
365
		?>
366
		<div class="pods-form-ui-field pods-dfv-field">
367
			<script type="application/json" class="pods-dfv-field-data"><?php echo $script_content; ?></script>
368
		</div>
369
		<?php
370
371
	}
372
373
	/**
374
	 * Build field data for Pods DFV
375
	 *
376
	 * @param object $args            {
377
	 *                                Field information arguments.
378
	 *
379
	 * @type string     $name            Field name
380
	 * @type string     $type            Pod field type
381
	 * @type string     $form_field_type HTML field type
382
	 * @type array      $options         Field options
383
	 * @type mixed      $value           Current value
384
	 * @type array      $pod             Pod information
385
	 * @type int|string $id              Current item ID
386
	 * }
387
	 *
388
	 * @return array
389
	 */
390
	public function build_dfv_field_data( $args ) {
391
392
		// Handle DFV options.
393
		$args->options = $this->build_dfv_field_options( $args->options, $args );
394
395
		// Handle DFV attributes.
396
		$attributes = PodsForm::merge_attributes( array(), $args->name, $args->type, $args->options );
397
		$attributes = $this->build_dfv_field_attributes( $attributes, $args );
398
		$attributes = array_map( 'esc_attr', $attributes );
399
400
		// Build DFV field data.
401
		$data = array(
402
			'htmlAttr'      => array(
403
				'id'         => $attributes['id'],
404
				'class'      => $attributes['class'],
405
				'name'       => $attributes['name'],
406
				'name_clean' => $attributes['data-name-clean'],
407
			),
408
			'fieldType'     => $args->type,
409
			'fieldItemData' => $this->build_dfv_field_item_data( $args ),
410
			'fieldConfig'   => $this->build_dfv_field_config( $args ),
411
		);
412
413
		/**
414
		 * Filter Pods DFV field data to further customize functionality.
415
		 *
416
		 * @since 2.7
417
		 *
418
		 * @param array     $data            DFV field data
419
		 * @param object    $args            {
420
		 *                                   Field information arguments.
421
		 *
422
		 * @type string     $name            Field name
423
		 * @type string     $type            Pod field type
424
		 * @type string     $form_field_type HTML field type
425
		 * @type array      $options         Field options
426
		 * @type mixed      $value           Current value
427
		 * @type array      $pod             Pod information
428
		 * @type int|string $id              Current item ID
429
		 * }
430
		 *
431
		 * @param array     $attributes      HTML attributes
432
		 */
433
		$data = apply_filters( 'pods_field_dfv_data', $data, $args, $attributes );
434
435
		return $data;
436
437
	}
438
439
	/**
440
	 * Build field options and handle any validation/customization for Pods DFV
441
	 *
442
	 * @param array  $options
443
	 * @param object $args    {
444
	 *                        Field information arguments.
445
	 *
446
	 * @type string     $name    Field name
447
	 * @type string     $type    Field type
448
	 * @type array      $options Field options
449
	 * @type mixed      $value   Current value
450
	 * @type array      $pod     Pod information
451
	 * @type int|string $id      Current item ID
452
	 * }
453
	 *
454
	 * @return array
455
	 */
456
	public function build_dfv_field_options( $options, $args ) {
457
458
		return $options;
459
460
	}
461
462
	/**
463
	 * Build field HTML attributes for Pods DFV.
464
	 *
465
	 * @param array  $attributes Default HTML attributes from field and PodsForm::merge_attributes.
466
	 * @param object $args       {
467
	 *                           Field information arguments.
468
	 *
469
	 * @type string     $name       Field name
470
	 * @type string     $type       Field type
471
	 * @type array      $options    Field options
472
	 * @type mixed      $value      Current value
473
	 * @type array      $pod        Pod information
474
	 * @type int|string $id         Current item ID
475
	 * }
476
	 *
477
	 * @return array
478
	 */
479
	public function build_dfv_field_attributes( $attributes, $args ) {
480
481
		return $attributes;
482
483
	}
484
485
	/**
486
	 * Build field config for Pods DFV using field options.
487
	 *
488
	 * This is for customizing the options and adding output-specific config values.
489
	 *
490
	 * @param object $args {
491
	 *      Field information arguments.
492
	 *
493
	 *      @type string     $name    Field name.
494
	 *      @type string     $type    Field type.
495
	 *      @type array      $options Field options.
496
	 *      @type mixed      $value   Current value.
497
	 *      @type array      $pod     Pod information.
498
	 *      @type int|string $id      Current item ID.
499
	 * }
500
	 *
501
	 * @return array
502
	 */
503
	public function build_dfv_field_config( $args ) {
504
505
		$config = $args->options;
506
507
		unset( $config['data'] );
508
509
		$config['item_id'] = (int) $args->id;
510
511
		return $config;
512
513
	}
514
515
	/**
516
	 * Build array of item data for Pods DFV.
517
	 *
518
	 * @param object $args {
519
	 *      Field information arguments.
520
	 *
521
	 *      @type string     $name    Field name.
522
	 *      @type string     $type    Field type.
523
	 *      @type array      $options Field options.
524
	 *      @type mixed      $value   Current value.
525
	 *      @type array      $pod     Pod information.
526
	 *      @type int|string $id      Current item ID.
527
	 * }
528
	 *
529
	 * @return array
530
	 */
531
	public function build_dfv_field_item_data( $args ) {
532
533
		$data = array();
534
535
		if ( ! empty( $args->options['data'] ) && is_array( $args->options['data'] ) ) {
536
			$data = $args->options['data'];
537
		}
538
539
		return $data;
540
541
	}
542
543
	/**
544
	 * Get the data from the field
545
	 *
546
	 * @param string            $name  The name of the field
547
	 * @param string|array|null $value The value of the field
548
	 * @param array|null        $options
549
	 * @param array|null        $pod
550
	 * @param int|null          $id
551
	 * @param boolean           $in_form
552
	 *
553
	 * @return array Array of possible field data
554
	 *
555
	 * @since 2.0
556
	 */
557
	public function data( $name, $value = null, $options = null, $pod = null, $id = null, $in_form = true ) {
558
559
		return (array) $value;
560
561
	}
562
563
	/**
564
	 * Build regex necessary for JS validation
565
	 *
566
	 * @param mixed|null  $value
567
	 * @param string|null $name
568
	 * @param array|null  $options
569
	 * @param string|null $pod
570
	 * @param int|null    $id
571
	 *
572
	 * @return bool
573
	 *
574
	 * @since 2.0
575
	 */
576
	public function regex( $value = null, $name = null, $options = null, $pod = null, $id = null ) {
577
578
		return false;
579
580
	}
581
582
	/**
583
	 * Validate a value before it's saved
584
	 *
585
	 * @param mixed       $value
586
	 * @param string|null $name
587
	 * @param array|null  $options
588
	 * @param array|null  $fields
589
	 * @param array|null  $pod
590
	 * @param int|null    $id
591
	 * @param array|null  $params
592
	 *
593
	 * @return bool
594
	 *
595
	 * @since 2.0
596
	 */
597
	public function validate( $value, $name = null, $options = null, $fields = null, $pod = null, $id = null, $params = null ) {
598
599
		return true;
600
601
	}
602
603
	/**
604
	 * Change the value or perform actions after validation but before saving to the DB
605
	 *
606
	 * @param mixed       $value
607
	 * @param int|null    $id
608
	 * @param string|null $name
609
	 * @param array|null  $options
610
	 * @param array|null  $fields
611
	 * @param array|null  $pod
612
	 * @param object|null $params
613
	 *
614
	 * @return mixed
615
	 *
616
	 * @since 2.0
617
	 */
618
	public function pre_save( $value, $id = null, $name = null, $options = null, $fields = null, $pod = null, $params = null ) {
619
620
		return $value;
621
622
	}
623
624
	/**
625
	 * Save the value to the DB
626
	 *
627
	 * @param mixed       $value
628
	 * @param int|null    $id
629
	 * @param string|null $name
630
	 * @param array|null  $options
631
	 * @param array|null  $fields
632
	 * @param array|null  $pod
633
	 * @param object|null $params
634
	 *
635
	 * @return bool|null Whether the value was saved, returning null means no save needed to occur
636
	 *
637
	 * @since 2.3
638
	 */
639
	public function save( $value, $id = null, $name = null, $options = null, $fields = null, $pod = null, $params = null ) {
640
641
		return null;
642
643
	}
644
645
	/**
646
	 * Perform actions after saving to the DB
647
	 *
648
	 * @param mixed       $value
649
	 * @param int|null    $id
650
	 * @param string|null $name
651
	 * @param array|null  $options
652
	 * @param array|null  $fields
653
	 * @param array|null  $pod
654
	 * @param object|null $params
655
	 *
656
	 * @since 2.0
657
	 */
658
	public function post_save( $value, $id = null, $name = null, $options = null, $fields = null, $pod = null, $params = null ) {
659
660
		// Subclasses utilize this method if needed.
661
	}
662
663
	/**
664
	 * Perform actions before deleting from the DB
665
	 *
666
	 * @param int|null    $id
667
	 * @param string|null $name
668
	 * @param array|null  $options
669
	 * @param string|null $pod
670
	 *
671
	 * @since 2.0
672
	 */
673
	public function pre_delete( $id = null, $name = null, $options = null, $pod = null ) {
674
675
		// Subclasses utilize this method if needed.
676
	}
677
678
	/**
679
	 * Delete the value from the DB
680
	 *
681
	 * @param int|null    $id
682
	 * @param string|null $name
683
	 * @param array|null  $options
684
	 * @param array|null  $pod
685
	 *
686
	 * @since 2.3
687
	 */
688
	public function delete( $id = null, $name = null, $options = null, $pod = null ) {
689
690
		// Subclasses utilize this method if needed.
691
	}
692
693
	/**
694
	 * Perform actions after deleting from the DB
695
	 *
696
	 * @param int|null    $id
697
	 * @param string|null $name
698
	 * @param array|null  $options
699
	 * @param array|null  $pod
700
	 *
701
	 * @since 2.0
702
	 */
703
	public function post_delete( $id = null, $name = null, $options = null, $pod = null ) {
704
705
		// Subclasses utilize this method if needed.
706
	}
707
708
	/**
709
	 * Customize the Pods UI manage table column output
710
	 *
711
	 * @param int         $id
712
	 * @param mixed       $value
713
	 * @param string|null $name
714
	 * @param array|null  $options
715
	 * @param array|null  $fields
716
	 * @param array|null  $pod
717
	 *
718
	 * @return string Value to be shown in the UI
719
	 *
720
	 * @since 2.0
721
	 */
722
	public function ui( $id, $value, $name = null, $options = null, $fields = null, $pod = null ) {
723
724
		return $value;
725
726
	}
727
728
	/**
729
	 * Strip HTML based on options.
730
	 *
731
	 * @param string|array $value   Field value.
732
	 * @param array|null   $options Field options.
733
	 *
734
	 * @return string
735
	 */
736
	public function strip_html( $value, $options = null ) {
737
738
		if ( is_array( $value ) ) {
739
			// @codingStandardsIgnoreLine
740
			$value = @implode( ' ', $value );
741
		}
742
743
		$value = trim( $value );
744
745
		if ( empty( $value ) ) {
746
			return $value;
747
		}
748
749
		$options = (array) $options;
750
751
		// Strip HTML
752
		if ( 1 === (int) pods_v( static::$type . '_allow_html', $options, 0, true ) ) {
753
			$allowed_html_tags = '';
754
755
			if ( 0 < strlen( pods_v( static::$type . '_allowed_html_tags', $options ) ) ) {
756
				$allowed_tags = pods_v( static::$type . '_allowed_html_tags', $options );
757
				$allowed_tags = trim( str_replace( array( '<', '>', ',' ), ' ', $allowed_tags ) );
758
				$allowed_tags = explode( ' ', $allowed_tags );
759
				$allowed_tags = array_unique( array_filter( $allowed_tags ) );
760
761
				if ( ! empty( $allowed_tags ) ) {
762
					$allowed_html_tags = '<' . implode( '><', $allowed_tags ) . '>';
763
				}
764
			}
765
766
			if ( ! empty( $allowed_html_tags ) ) {
767
				$value = strip_tags( $value, $allowed_html_tags );
768
			}
769
		} else {
770
			$value = strip_tags( $value );
771
		}
772
773
		// Strip shortcodes
774
		$value = strip_shortcodes( $value );
775
776
		return $value;
777
	}
778
779
	/**
780
	 * Placeholder function to allow var_export() use with classes
781
	 *
782
	 * @param array $properties
783
	 *
784
	 * @return object|void
785
	 */
786
	public static function __set_state( $properties ) {
787
788
		return;
789
790
	}
791
792
}
793