Passed
Branch master (38ab27)
by Michael
03:06
created

TDMCreatePhpCode   F

Complexity

Total Complexity 87

Size/Duplication

Total Lines 700
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 700
rs 1.263
c 0
b 0
f 0
wmc 87

39 Methods

Rating   Name   Duplication   Size   Complexity  
B getPhpCodeIncludeDir() 0 20 5
A getPhpCodeWhile() 0 7 1
B getPhpCodeForeach() 0 17 8
A getPhpCodeEmpty() 0 3 1
A getPhpCodeDefine() 0 3 1
C getPhpCodeGlobalsVariables() 0 28 7
A getPhpCodeHeader() 0 3 1
A getPhpCodeFunction() 0 10 3
A getPhpCodeSwitch() 0 8 1
A getPhpCodeConditions() 0 15 2
A getPhpCodeGlobals() 0 9 2
A getPhpCodeIsDir() 0 3 1
A getPhpCodeStripTags() 0 9 2
A getPhpCodeHtmlentities() 0 6 2
A getPhpCodeMkdir() 0 3 1
A getPhpCodePregFunzions() 0 10 2
A getPhpCodeArrayType() 0 10 3
A getPhpCodeHtmlspecialchars() 0 6 2
A getPhpCodeFileExists() 0 3 1
A getPhpCodeRemoveCarriageReturn() 0 3 1
A getPhpCodeVariableClass() 0 3 1
A getPhpCodeIsset() 0 3 1
B getPhpCodeCommentMultiLine() 0 14 5
A getPhpCodeCommentLine() 0 6 2
A getPhpCodeChmod() 0 3 1
A getPhpCodeStrType() 0 10 2
A getPhpCodeRawurlencode() 0 3 1
C getPhpCodeCaseSwitch() 0 27 8
A getPhpCodeTernaryOperator() 0 3 1
A getPhpCodeImplode() 0 3 1
A getPhpCodeExplode() 0 3 1
B getPhpCodeArray() 0 24 6
A getInstance() 0 8 2
A getPhpCodeUnset() 0 3 1
A getPhpCodeSprintf() 0 3 1
A getPhpCodeDefined() 0 3 1
A getPhpCodeFor() 0 7 1
A getPhpCodeCopy() 0 3 1
A getPhpCodeClass() 0 10 3

How to fix   Complexity   

Complex Class

Complex classes like TDMCreatePhpCode 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.

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 TDMCreatePhpCode, and based on these observations, apply Extract Interface, too.

1
<?php
2
3
/*
4
 You may not change or alter any portion of this comment or credits
5
 of supporting developers from this source code or any supporting source code
6
 which is considered copyrighted (c) material of the original comment or credit authors.
7
8
 This program is distributed in the hope that it will be useful,
9
 but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11
 */
12
/**
13
 * tdmcreate module.
14
 *
15
 * @copyright       XOOPS Project (https://xoops.org)
16
 * @license         GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
17
 *
18
 * @since           2.5.0
19
 *
20
 * @author          Txmod Xoops http://www.txmodxoops.org
21
 *
22
 * @version         $Id: TDMCreatePhpCode.php 12258 2014-01-02 09:33:29Z timgno $
23
 */
24
25
/**
26
 * Class TDMCreatePhpCode.
27
 */
28
class TDMCreatePhpCode
29
{
30
    /**
31
    *  @static function getInstance
32
    *  @param null
33
     * @return TDMCreatePhpCode
34
     */
35
    public static function getInstance()
36
    {
37
        static $instance = false;
38
        if (!$instance) {
39
            $instance = new self();
40
        }
41
42
        return $instance;
43
    }
44
45
    /**
46
     * @public function getPhpCodeCommentLine
47
     * @param        $comment
48
     * @param        $var
49
     * @param string $t
50
     * @return string
51
     */
52
    public function getPhpCodeCommentLine($comment = null, $var = null, $t = '')
53
    {
54
        $value = !empty($var) ? ' '.$var : '';
55
        $ret = "{$t}// {$comment}{$value}\n";
56
57
        return $ret;
58
    }
59
60
    /**
61
     * @public function getPhpCodeCommentMultiLine
62
     * @param array  $multiLine
63
     *
64
     * @param string $t
65
     * @return string
66
     */
67
    public function getPhpCodeCommentMultiLine($multiLine = [], $t = '')
68
    {
69
        $values = !empty($multiLine) ? $multiLine : [];
70
        $ret = "\n{$t}/**\n";
71
        foreach ($values as $string => $value) {
72
            if ('' === $string && '' === $value) {
73
                $ret .= "{$t} *\n";
74
            } else {
75
                $ret .= "{$t} * {$string} {$value}\n";
76
            }
77
        }
78
        $ret .= "{$t} */\n";
79
80
        return $ret;
81
    }
82
83
    /**
84
    *  @public function getPhpCodeDefine
85
    *  @param $left
86
    *  @param $right
87
    *
88
    *  @return string
89
    */
90
    public function getPhpCodeDefine($left, $right)
91
    {
92
        return "define('{$left}', {$right});\n";
93
    }
94
95
    /**
96
    *  @public function getPhpCodeDefine
97
    *  @param $left
98
    *  @param $right
99
    *
100
    *  @return string
101
    */
102
    public function getPhpCodeDefined($left = 'XOOPS_ROOT_PATH', $right = 'Restricted access')
103
    {
104
        return "defined('{$left}') || die('{$right}');\n";
105
    }
106
107
    /**
108
    *  @public function getPhpCodeGlobals
109
    *  @param $var
110
    *  @param $value
111
    *
112
    *  @return string
113
    */
114
    public function getPhpCodeGlobals($var, $value = '')
115
    {
116
        if ('' != $value) {
117
            $ret = "\$GLOBALS['{$var}'] = \${$value};\n";
118
        } else {
119
            $ret = "\$GLOBALS['{$var}']";
120
        }
121
122
        return $ret;
123
    }
124
125
    /**
126
    *  @public function getPhpCodeGlobalsVariables
127
    *  @param $var
128
    *  @param $type
129
    *
130
    *  @return string
131
    */
132
    public function getPhpCodeGlobalsVariables($var = null, $type = 'REQUEST')
133
    {
134
        $type = strtoupper($type);
135
        switch ($type) {
136
            case 'GET':
137
                $ret = "\$_GET['{$var}']";
138
                break;
139
            case 'POST':
140
                $ret = "\$_POST['{$var}']";
141
                break;
142
            case 'FILES':
143
                $ret = "\$_FILES['{$var}']";
144
                break;
145
            case 'COOKIE':
146
                $ret = "\$_COOKIE['{$var}']";
147
                break;
148
            case 'ENV':
149
                $ret = "\$_ENV['{$var}']";
150
                break;
151
            case 'SERVER':
152
                $ret = "\$_SERVER['{$var}']";
153
                break;
154
            default:
155
                $ret = "\$_REQUEST['{$var}']";
156
                break;
157
        }
158
159
        return $ret;
160
    }
161
162
    /**
163
     * @public function getPhpCodeRemoveCarriageReturn
164
     * @param        $string
165
     *
166
     * @param string $n
167
     * @param string $t
168
     * @return string
169
     */
170
    public function getPhpCodeRemoveCarriageReturn($string, $n = "\n", $t = "\r")
171
    {
172
        return str_replace(["{$n}", "{$t}"], '', $string);
173
    }
174
175
    /**
176
    *  @public function getPhpCodeFileExists
177
    *  @param $filename
178
    *
179
    *  @return string
180
    */
181
    public function getPhpCodeFileExists($filename)
182
    {
183
        return "file_exists({$filename})";
184
    }
185
186
    /**
187
     * @public function getPhpCodeIncludeDir
188
     * @param        $directory
189
     * @param        $filename
190
     * @param bool   $once
191
     * @param bool   $isPath
192
     *
193
     * @param string $type
194
     * @param string $t
195
     * @return string
196
     */
197
    public function getPhpCodeIncludeDir($directory = null, $filename = null, $once = false, $isPath = false, $type = 'include', $t = '')
198
    {
199
        if ('' === $type) {
200
            $type = 'include';
201
        }
202
        if (false === $once) {
203
            if (!$isPath) {
204
                $ret = "{$t}{$type} {$directory} .'/{$filename}.php';\n";
205
            } else {
206
                $ret = "{$t}{$type} {$directory};\n";
207
            }
208
        } else {
209
            if (!$isPath) {
210
                $ret = "{$t}{$type}_once {$directory} .'/{$filename}.php';\n";
211
            } else {
212
                $ret = "{$t}{$type}_once {$directory};\n";
213
            }
214
        }
215
216
        return $ret;
217
    }
218
219
    /**
220
    *  @public function getPhpCodeTernaryOperator
221
    *  @param $return
222
    *  @param $condition
223
    *  @param $one
224
    *  @param $two
225
    *  @param $t - Indentation
226
    *
227
    *  @return string
228
    */
0 ignored issues
show
Documentation Bug introduced by
The doc comment - at position 0 could not be parsed: Unknown type name '-' at position 0 in -.
Loading history...
229
    public function getPhpCodeTernaryOperator($return, $condition, $one, $two, $t = '')
230
    {
231
        return "{$t}\${$return} = {$condition} ? {$one} : {$two};\n";
232
    }
233
234
    /**
235
    *  @public function getPhpCodeClass
236
    *  @param $name
237
    *  @param $content
238
    *  @param $extends
239
    *  @param $type
240
    *
241
    *  @return string
242
    */
243
    public function getPhpCodeClass($name = null, $content = null, $extends = null, $type = null)
244
    {
245
        $typ = (null != $type) ? "{$type} " : '';
246
        $ext = (null != $extends) ? " extends {$extends}" : '';
247
        $ret = "{$typ}class {$name}{$ext}\n";
248
        $ret .= '{';
249
        $ret .= "{$content}";
250
        $ret .= "}\n";
251
252
        return $ret;
253
    }
254
255
    /**
256
    *  @public function getPhpCodeClass
257
    *  @param $type
258
    *  @param $name
259
    *  @param $assign
260
    *  @param $t - Indentation
261
    *
262
    *  @return string
263
    */
0 ignored issues
show
Documentation Bug introduced by
The doc comment - at position 0 could not be parsed: Unknown type name '-' at position 0 in -.
Loading history...
264
    public function getPhpCodeVariableClass($type = 'private', $name = null, $assign = 'null', $t = '')
265
    {
266
        return "{$t}{$type} \${$name} = {$assign};\n";
267
    }
268
269
    /**
270
     * @public function getPhpCodeFunction
271
     * @param        $name
272
     * @param        $params
273
     * @param        $content
274
     * @param        $method
275
     * @param bool   $isRef
276
     * @param string $t - Indentation
277
     * @return string
278
     */
279
    public function getPhpCodeFunction($name = null, $params = null, $content = null, $method = null, $isRef = false, $t = '')
280
    {
281
        $inClass = (null != $method) ? $method : '';
282
        $ref = (false !== $isRef) ? '&' : '';
283
        $ret = "{$t}{$inClass}function {$ref}{$name}({$params})\n";
284
        $ret .= "{$t}{\n";
285
        $ret .= "{$content}";
286
        $ret .= "{$t}}\n";
287
288
        return $ret;
289
    }
290
291
    /**
292
     * @public function getPhpCodeConditions
293
     * @param string $condition
294
     * @param string $operator
295
     * @param string $type
296
     * @param string $contentIf
297
     * @param mixed  $contentElse
298
     * @param $t - Indentation
299
     *
300
     * @return string
301
     */
0 ignored issues
show
Documentation Bug introduced by
The doc comment - at position 0 could not be parsed: Unknown type name '-' at position 0 in -.
Loading history...
302
    public function getPhpCodeConditions($condition = null, $operator = null, $type = null, $contentIf = null, $contentElse = false, $t = '')
303
    {
304
        if (false === $contentElse) {
305
            $ret = "{$t}if({$condition}{$operator}{$type}) {\n";
306
            $ret .= "{$contentIf}";
307
            $ret .= "{$t}}\n";
308
        } else {
309
            $ret = "{$t}if({$condition}{$operator}{$type}) {\n";
310
            $ret .= "{$contentIf}";
311
            $ret .= "{$t}} else {\n";
312
            $ret .= "{$contentElse}";
313
            $ret .= "{$t}}\n";
314
        }
315
316
        return $ret;
317
    }
318
319
    /**
320
     * @public function getPhpCodeForeach
321
     * @param string      $array
322
     * @param bool|string $arrayKey
323
     * @param bool|string $key
324
     * @param bool|string $value
325
     * @param string      $content
326
     *
327
     * @param string      $t
328
     * @return string
329
     */
330
    public function getPhpCodeForeach($array, $arrayKey = false, $key = false, $value = false, $content = null, $t = '')
331
    {
332
        $vars = '';
333
        $value = '' !== $value ? $value : 'i';
334
        if ((false === $arrayKey) && (false === $key)) {
335
            $vars = "\${$array} as \${$value}";
336
        } elseif ((false === $arrayKey) && (false !== $key)) {
337
            $vars = "\${$array} as \${$key} => \${$value}";
338
        } elseif ((false !== $arrayKey) && (false === $key)) {
339
            $vars = "array_keys(\${$array}) as \${$value}";
340
        }
341
342
        $ret = "{$t}foreach({$vars}) {\n";
343
        $ret .= "{$t}{$content}";
344
        $ret .= "{$t}}\n";
345
346
        return $ret;
347
    }
348
349
    /**
350
     * @public function getPhpCodeFor
351
     * @param        $var
352
     * @param        $content
353
     * @param        $value
354
     * @param        $initVal
355
     * @param        $operator
356
     *
357
     * @param string $t
358
     * @return string
359
     */
360
    public function getPhpCodeFor($var = null, $content = null, $value = null, $initVal = null, $operator = null, $t = '')
361
    {
362
        $ret = "{$t}for(\${$var} = {$initVal}; {$var} {$operator} \${$value}; \${$var}++) {\n";
363
        $ret .= "{$t}{$content}";
364
        $ret .= "{$t}}\n";
365
366
        return $ret;
367
    }
368
369
    /**
370
     * @public function getPhpCodeWhile
371
     * @param $var
372
     * @param $content
373
     * @param $value
374
     * @param $operator
375
     *  @param $t
376
     *
377
     * @return string
378
     */
379
    public function getPhpCodeWhile($var = null, $content = null, $value = null, $operator = null, $t = '')
380
    {
381
        $ret = "{$t}while(\${$var} {$operator} {$value}) {\n";
382
        $ret .= "{$t}{$content}";
383
        $ret .= "{$t}}\n";
384
385
        return $ret;
386
    }
387
388
    /**
389
     *  @public function getPhpCodeSwitch
390
     *
391
     *  @param $op
392
     *  @param $content
393
     *  @param $t
394
     *
395
     *  @return string
396
     */
397
    public function getPhpCodeSwitch($op = null, $content = null, $t = '')
398
    {
399
        //$ret = "{$t}switch(\${$op}) {\n"; test goffy
400
		$ret = "switch(\${$op}) {\n";
401
        $ret .= "{$content}";
402
        $ret .= "}\n";
403
404
        return $ret;
405
    }
406
407
    /**
408
     *  @public function getPhpCodeCaseSwitch
409
     *
410
     *  @param $cases
411
     *  @param $defaultAfterCase
412
     *  @param $default
413
     *  @param $t
414
     *
415
     *  @return string
416
     */
417
    public function getPhpCodeCaseSwitch($cases = [], $defaultAfterCase = false, $default = false, $t = '')
418
    {
419
        $ret = '';
420
        $def = "{$t}default:\n";
421
        foreach ($cases as $case => $value) {
422
            $case = is_string($case) ? "'{$case}'" : $case;
423
            if (!empty($case)) {
424
                $ret .= "{$t}case {$case}:\n";
425
                if (false !== $defaultAfterCase) {
426
                    $ret .= $def;
427
                }
428
                if (is_array($value)) {
429
                    foreach ($value as $content) {
430
                        $ret .= "{$t}{$t}{$content}\n";
431
                    }
432
                }
433
                $ret .= "{$t}break;\n";
434
            }
435
            $defaultAfterCase = false;
436
        }
437
        if (false !== $default) {
438
            $ret .= $def;
439
            $ret .= "{$t}{$default}\n";
440
            $ret .= "{$t}break;\n";
441
        }
442
443
        return $ret;
444
    }
445
446
    /**
447
    *  @public function getPhpCodeIsset
448
    *  @param $var
449
    *  @return string
450
    */
451
    public function getPhpCodeIsset($var)
452
    {
453
        return "isset(\${$var})";
454
    }
455
456
    /**
457
     * @public function getPhpCodeUnset
458
     * @param string $var
459
     * @param string $t
460
     * @return string
461
     */
462
    public function getPhpCodeUnset($var = '', $t = '')
463
    {
464
        return "{$t}unset(\${$var});\n";
465
    }
466
467
    /**
468
    *  @public function getPhpCodeIsDir
469
    *  @param $var
470
    *  @return string
471
    */
472
    public function getPhpCodeIsDir($var)
473
    {
474
        return "is_dir({$var})";
475
    }
476
477
    /**
478
    *  @public function getPhpCodeImplode
479
    *  @param $left
480
    *  @param $right
481
    *  @return string
482
    */
483
    public function getPhpCodeImplode($left, $right)
484
    {
485
        return "implode('{$left}', {$right})";
486
    }
487
488
    /**
489
    *  @public function getPhpCodeExplode
490
    *  @param $left
491
    *  @param $right
492
    *  @return string
493
    */
494
    public function getPhpCodeExplode($left, $right)
495
    {
496
        return "explode('{$left}', {$right})";
497
    }
498
499
    /**
500
     * @public function getPhpCodeChmod
501
     * @param        $var
502
     * @param string $perm
503
     * @param string $t
504
     * @return string
505
     */
506
    public function getPhpCodeChmod($var, $perm = '0777', $t = '')
507
    {
508
        return "{$t}chmod(\${$var}, {$perm});\n";
509
    }
510
511
    /**
512
     * @public function getPhpCodeMkdir
513
     * @param        $var
514
     * @param string $perm
515
     * @param string $t
516
     * @return string
517
     */
518
    public function getPhpCodeMkdir($var, $perm = '0777', $t = '')
519
    {
520
        return "{$t}mkdir(\${$var}, {$perm});\n";
521
    }
522
523
    /**
524
     * @public function getPhpCodeCopy
525
     * @param        $file
526
     * @param string $newfile
527
     * @param string $t
528
     * @return string
529
     */
530
    public function getPhpCodeCopy($file, $newfile = '', $t = '')
531
    {
532
        return "{$t}copy({$file}, {$newfile});\n";
533
    }
534
535
    /**
536
     * @public function getPhpCodeArray
537
     * @param        $var
538
     * @param        $array
539
     * @param bool   $isParam
540
     *
541
     * @param string $t
542
     * @return string
543
     */
544
    public function getPhpCodeArray($var, $array = null, $isParam = false, $t = "\t\t")
545
    {
546
        $retArray = [];
547
        if (is_array($array) && !empty($array)) {
548
            foreach ($array as $k => $v) {
549
                if (is_numeric($k)) {
550
                    $retArray[] = $v;
551
                } else {
552
                    $retArray[] = "{$k} => {$v}";
553
                }
554
            }
555
            $arrayContent = implode(', ', $retArray);
556
        } else {
557
            $arrayContent = '';
558
        }
559
        unset($retArray);
560
561
        if (!$isParam) {
562
            $ret = "{$t}\${$var} = array({$arrayContent});\n";
563
        } else {
564
            $ret = "array({$array})";
565
        }
566
567
        return $ret;
568
    }
569
570
    /**
571
     * @public function getPhpCodeArrayType
572
     * @param        $var
573
     * @param        $type
574
     * @param        $left
575
     * @param        $right
576
     * @param bool   $isParam
577
     *
578
     * @param string $t
579
     * @return string
580
     */
581
    public function getPhpCodeArrayType($var, $type, $left, $right = null, $isParam = false, $t = "\t\t")
582
    {
583
        $vars = (null != $right) ? "\${$left}, {$right}" : "\${$left}";
584
        if (!$isParam) {
585
            $ret = "{$t}\${$var}[] = array_{$type}({$vars});\n";
586
        } else {
587
            $ret = "array_{$type}({$vars})";
588
        }
589
590
        return $ret;
591
    }
592
593
    /**
594
    *  @public function getPhpCodeSprintf
595
    *  @param $left
596
    *  @param $right
597
    *  @return string
598
    */
599
    public function getPhpCodeSprintf($left, $right)
600
    {
601
        return "sprintf({$left}, {$right})";
602
    }
603
604
    /**
605
    *  @public function getPhpCodeEmpty
606
    *  @param $var
607
    *  @return string
608
    */
609
    public function getPhpCodeEmpty($var)
610
    {
611
        return "empty({$var})";
612
    }
613
614
    /**
615
    *  @public function getPhpCodeHeader
616
    *  @param $var
617
    *  @return string
618
    */
619
    public function getPhpCodeHeader($var)
620
    {
621
        return "header({$var})";
622
    }
623
624
    /**
625
    *  @public function getPhpCodeRawurlencode
626
    *  @param $var
627
    *  @return string
628
    */
629
    public function getPhpCodeRawurlencode($var)
630
    {
631
        return "rawurlencode({$var})";
632
    }
633
634
    /**
635
     * @public function getPhpCodePregFunzions
636
     * @param        $var
637
     * @param        $exp
638
     * @param        $str
639
     * @param        $val
640
     * @param string $type
641
     * @param bool   $isParam
642
     *
643
     * @param string $t
644
     * @return string
645
     */
646
    public function getPhpCodePregFunzions($var, $exp, $str, $val, $type = 'match', $isParam = false, $t = "\t")
647
    {
648
        $pregFunz = "preg_{$type}('";
649
        if (!$isParam) {
650
            $ret = "{$t}\${$var} = {$pregFunz}{$exp}', '{$str}', {$val});\n";
651
        } else {
652
            $ret = "{$pregFunz}{$exp}', '{$str}', {$val})";
653
        }
654
655
        return $ret;
656
    }
657
658
    /**
659
     * @public function getPhpCodeStrType
660
     * @param        $left
661
     * @param        $var
662
     * @param        $str
663
     * @param        $value
664
     * @param string $type
665
     * @param bool   $isParam
666
     *
667
     * @param string $t
668
     * @return string
669
     */
670
    public function getPhpCodeStrType($left, $var, $str, $value, $type = 'replace', $isParam = false, $t = "\t")
671
    {
672
        $strType = "str_{$type}('";
673
        if (!$isParam) {
674
            $ret = "{$t}\${$left} = {$strType}{$var}', '{$str}', {$value});\n";
675
        } else {
676
            $ret = "{$strType}{$var}', '{$str}', {$value})";
677
        }
678
679
        return $ret;
680
    }
681
682
    /**
683
     * @public function getPhpCodeStripTags
684
     * @param        $left
685
     * @param        $value
686
     * @param bool   $isParam
687
     *
688
     * @param string $t
689
     * @return string
690
     */
691
    public function getPhpCodeStripTags($left, $value, $isParam = false, $t = '')
692
    {
693
        if (!$isParam) {
694
            $ret = "{$t}\${$left} = strip_tags({$value});\n";
695
        } else {
696
            $ret = "strip_tags({$value})";
697
        }
698
699
        return $ret;
700
    }
701
702
    /**
703
    *  @public function getPhpCodeHtmlentities
704
    *  @param $entitiesVar
705
    *  @param $entitiesQuote
706
    *  @return string
707
    */
708
    public function getPhpCodeHtmlentities($entitiesVar, $entitiesQuote = false)
709
    {
710
        $entitiesVar = (false !== $entitiesQuote) ? $entitiesVar . ', ' . $entitiesQuote : $entitiesVar;
711
        $entities = "htmlentities({$entitiesVar})";
712
713
        return $entities;
714
    }
715
716
    /**
717
    *  @public function getPhpCodeHtmlspecialchars
718
    *  @param $specialVar
719
    *  @param $specialQuote
720
    *  @return string
721
    */
722
    public function getPhpCodeHtmlspecialchars($specialVar, $specialQuote = false)
723
    {
724
        $specialVar = (false !== $specialQuote) ? $specialVar . ', ' . $specialQuote : $specialVar;
725
        $specialchars = "htmlspecialchars({$specialVar})";
726
727
        return $specialchars;
728
    }
729
}
730