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

ClassXoopsCode::getXoopsSimpleForm()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 6
nc 2
nop 8
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0

How to fix   Many Parameters   

Many Parameters

Methods with many parameters are not only hard to understand, but their parameters also often become inconsistent when you need more, or different data.

There are several approaches to avoid long parameter lists:

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: ClassXoopsCode.php 12258 2014-01-02 09:33:29Z timgno $
23
 */
24
25
/**
26
 * Class ClassXoopsCode.
27
 */
28
class ClassXoopsCode
29
{
30
    /*
31
    *  @static function getInstance
32
    *  @param null
33
    */
34
    /**
35
     * @return ClassXoopsCode
36
     */
37
    public static function getInstance()
38
    {
39
        static $instance = false;
40
        if (!$instance) {
41
            $instance = new self();
42
        }
43
44
        return $instance;
45
    }
46
47
    /**
48
     * @public function getClassCriteriaCompo
49
     *
50
     * @param        $var
51
     * @param string $t
52
     *
53
     * @return string
54
     */
55
    public function getClassCriteriaCompo($var, $t = '')
56
    {
57
        return "{$t}\${$var} = new CriteriaCompo();\n";
58
    }
59
60
    /**
61
     * @public function getClassCriteria
62
     *
63
     * @param        $var
64
     * @param        $param1
65
     * @param string $param2
66
     * @param string $param3
67
     * @param bool   $isParam
68
     * @param string $t
69
     *
70
     * @return string
71
     */
72
    public function getClassCriteria($var, $param1, $param2 = '', $param3 = '', $isParam = false, $t = '')
73
    {
74
        $params = ('' != $param2) ? ', ' . $param2 : '';
75
        $params .= ('' != $param3) ? ', ' . $param3 : '';
76
77
        if (false === $isParam) {
78
            $ret = "{$t}\${$var} = new Criteria( {$param1}{$params} );\n";
79
        } else {
80
            $ret = "new Criteria( {$param1}{$params} )";
81
        }
82
83
        return $ret;
84
    }
85
86
    /**
87
     * @public function getClassAdd
88
     *
89
     * @param        $var
90
     * @param        $param
91
     * @param string $t
92
     *
93
     * @return string
94
     */
95
    public function getClassAdd($var, $param, $t = '')
96
    {
97
        return "{$t}\${$var}->add( {$param} );\n";
98
    }
99
100
    /**
101
     * @public function getClassSetStart
102
     *
103
     * @param        $var
104
     * @param        $start
105
     * @param string $t
106
     *
107
     * @return string
108
     */
109
    public function getClassSetStart($var, $start, $t = '')
110
    {
111
        return "{$t}\${$var}->setStart( \${$start} );\n";
112
    }
113
114
    /**
115
     * @public function getClassSetLimit
116
     *
117
     * @param        $var
118
     * @param        $limit
119
     * @param string $t
120
     *
121
     * @return string
122
     */
123
    public function getClassSetLimit($var, $limit, $t = '')
124
    {
125
        return "{$t}\${$var}->setLimit( \${$limit} );\n";
126
    }
127
128
    /**
129
     * @public function getClassAdd
130
     *
131
     * @param        $var
132
     * @param        $sort
133
     * @param string $t
134
     *
135
     * @return string
136
     */
137
    public function getClassSetSort($var, $sort, $t = '')
138
    {
139
        return "{$t}\${$var}->setSort( \${$sort} );\n";
140
    }
141
142
    /**
143
     * @public function getClassAdd
144
     *
145
     * @param        $var
146
     * @param        $order
147
     * @param string $t
148
     *
149
     * @return string
150
     */
151
    public function getClassSetOrder($var, $order, $t = '')
152
    {
153
        return "{$t}\${$var}->setOrder( \${$order} );\n";
154
    }
155
156
    /**
157
     * @public function getClassAdd
158
     *
159
     * @param string $paramLeft
160
     * @param string $paramRight
161
     * @param string $var
162
     * @param string $t
163
     *
164
     * @return string
165
     */
166
    public function getClassInitVar($paramLeft = '', $paramRight = '', $var = 'this', $t = "\t\t")
167
    {
168
        $stuParamRight = strtoupper($paramRight);
169
170
        return "{$t}\${$var}->initVar('{$paramLeft}', XOBJ_DTYPE_{$stuParamRight});\n";
171
    }
172
173
    /**
174
     * @public function getClassXoopsPageNav
175
     *
176
     * @param        $var
177
     * @param        $param1
178
     * @param null   $param2
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $param5 is correct as it would always require null to be passed?
Loading history...
Documentation Bug introduced by
Are you sure the doc-type for parameter $param2 is correct as it would always require null to be passed?
Loading history...
Documentation Bug introduced by
Are you sure the doc-type for parameter $param4 is correct as it would always require null to be passed?
Loading history...
Documentation Bug introduced by
Are you sure the doc-type for parameter $param3 is correct as it would always require null to be passed?
Loading history...
179
     * @param null   $param3
180
     * @param null   $param4
181
     * @param null   $param5
182
     * @param bool   $isParam
183
     * @param string $t
184
     *
185
     * @return string
186
     */
187
    public function getClassXoopsPageNav($var, $param1, $param2 = null, $param3 = null, $param4 = null, $param5 = null, $isParam = false, $t = '')
188
    {
189
        $xPageNav = 'new XoopsPageNav(';
190
        if (false === $isParam) {
191
            $ret = "{$t}\${$var} = {$xPageNav}\${$param1}, \${$param2}, \${$param3}, '{$param4}', {$param5});\n";
192
        } else {
193
            $ret = "{$xPageNav}\${$param1}, \${$param2}, \${$param3}, '{$param4}', {$param5})";
194
        }
195
196
        return $ret;
197
    }
198
199
    /**
200
     *  @public function getXoopsSimpleForm
201
     *
202
     * @param string $left
203
     * @param string $element
204
     * @param string $elementsContent
205
     * @param string $caption
206
     * @param string $var
207
     * @param string $filename
208
     * @param string $type
209
     * @param string $t
210
     *
211
     * @return string
212
     */
213
    public function getXoopsSimpleForm($left = '', $element = '', $elementsContent = '', $caption = '', $var = '', $filename = '', $type = 'post', $t = '')
214
    {
215
        $ret = "{$t}\${$left} = new XoopsSimpleForm({$caption}, '{$var}', '{$filename}.php', '{$type}');\n";
216
        if (!empty($elementsContent)) {
217
            $ret .= "{$elementsContent}";
218
        }
219
        $ret .= "{$t}\${$left}->addElement(\${$element});\n";
220
        $ret .= "{$t}\${$left}->display();\n";
221
222
        return $ret;
223
    }
224
225
    /**
226
     * @public function getClassXoopsThemeForm
227
     *
228
     * @param        $var
229
     * @param        $param1
230
     * @param null   $param2
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $param4 is correct as it would always require null to be passed?
Loading history...
Documentation Bug introduced by
Are you sure the doc-type for parameter $param2 is correct as it would always require null to be passed?
Loading history...
Documentation Bug introduced by
Are you sure the doc-type for parameter $param3 is correct as it would always require null to be passed?
Loading history...
231
     * @param null   $param3
232
     * @param null   $param4
233
     * @param bool   $isParam
234
     * @param string $t
235
     *
236
     * @return string
237
     */
238
    public function getClassXoopsThemeForm($var, $param1, $param2 = null, $param3 = null, $param4 = null, $isParam = false, $t = "\t\t")
239
    {
240
        $themeForm = 'new XoopsThemeForm(';
241
        if (false === $isParam) {
242
            $ret = "{$t}\${$var} = {$themeForm}\${$param1}, '{$param2}', \${$param3}, '{$param4}', true);\n";
243
        } else {
244
            $ret = "{$themeForm}\${$param1}, '{$param2}', \${$param3}, '{$param4}', true)";
245
        }
246
247
        return $ret;
248
    }
249
250
    /**
251
     * @public function XoopsFormElementTray
252
     *
253
     * @param        $var
254
     * @param        $param1
255
     * @param string $param2
256
     * @param string $t
257
     *
258
     * @return string
259
     */
260
    public function getClassXoopsFormElementTray($var, $param1, $param2 = '', $t = "\t\t")
261
    {
262
        return "{$t}\${$var} = new XoopsFormElementTray({$param1}, '{$param2}' );\n";
263
    }
264
265
    /**
266
     * @public function getClassXoopsFormLabel
267
     *
268
     * @param        $var
269
     * @param string $param1
270
     * @param null   $param2
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $param2 is correct as it would always require null to be passed?
Loading history...
271
     * @param bool   $isParam
272
     * @param string $t
273
     *
274
     * @return string
275
     */
276
    public function getClassXoopsFormLabel($var, $param1 = '', $param2 = null, $isParam = false, $t = "\t\t")
277
    {
278
        $label = 'new XoopsFormLabel(';
279
        $params = null != $param2 ? "{$param1}, {$param2}" : $param1;
280
        if (false === $isParam) {
281
            $ret = "{$t}\${$var} = {$label}{$params});\n";
282
        } else {
283
            $ret = "{$label}{$params})";
284
        }
285
286
        return $ret;
287
    }
288
289
    /**
290
     * @public function getClassXoopsFormFile
291
     *
292
     * @param        $var
293
     * @param        $param1
294
     * @param        $param2
295
     * @param        $param3
296
     * @param bool   $isParam
297
     * @param string $t
298
     *
299
     * @return string
300
     */
301
    public function getClassXoopsFormFile($var, $param1, $param2, $param3, $isParam = false, $t = "\t\t")
302
    {
303
        $file = 'new XoopsFormFile( ';
304
        if (false === $isParam) {
305
            $ret = "{$t}\${$var} = {$file}{$param1}, '{$param2}', {$param3} );\n";
306
        } else {
307
            $ret = "{$file}{$param1}, '{$param2}', {$param3} )";
308
        }
309
310
        return $ret;
311
    }
312
313
    /**
314
     * @public function getClassXoopsFormHidden
315
     *
316
     * @param        $var
317
     * @param        $param1
318
     * @param        $param2
319
     * @param bool   $isForm
320
     * @param bool   $isParam
321
     * @param string $t
322
     *
323
     * @return string
324
     */
325
    public function getClassXoopsFormHidden($var, $param1, $param2, $isForm = false, $isParam = false, $t = "\t\t")
326
    {
327
        $hidden = 'new XoopsFormHidden( ';
328
        $getVarHidden = TDMCreateXoopsCode::getInstance()->getXcGetVar('', 'this', $param2, true);
329
        $ret = '';
330
        if (false === $isParam) {
331
            $ret .= "{$t}\${$var} = {$hidden}{$param1}, {$getVarHidden} );\n";
332
        } else {
333
            if (false === $isForm) {
334
                $ret .= "{$hidden}{$param1}, {$param2} )";
335
            } else {
336
                $ret .= "{$hidden}'{$param1}', '{$param2}' )";
337
            }
338
        }
339
340
        return $ret;
341
    }
342
343
    /**
344
     * @public function getClassXoopsFormText
345
     *
346
     * @param        $var
347
     * @param        $param1
348
     * @param        $param2
349
     * @param int    $param3
350
     * @param int    $param4
351
     * @param        $param5
352
     * @param bool   $isParam
353
     * @param string $t
354
     *
355
     * @return string
356
     */
357
    public function getClassXoopsFormText($var, $param1, $param2, $param3, $param4, $param5, $isParam = false, $t = "\t\t")
358
    {
359
        $text = 'new XoopsFormText( ';
360
        if (false === $isParam) {
361
            $ret = "{$t}\${$var} = {$text}{$param1}, '{$param2}', {$param3}, {$param4}, \${$param5} );\n";
362
        } else {
363
            $ret = "{$text}{$param1}, '{$param2}', {$param3}, {$param4}, \${$param5} )";
364
        }
365
366
        return $ret;
367
    }
368
369
    /**
370
     * @public function getClassXoopsFormTextArea
371
     *
372
     * @param        $var
373
     * @param        $param1
374
     * @param        $param2
375
     * @param        $param3
376
     * @param        $param4
377
     * @param bool   $isParam
378
     * @param string $t
379
     *
380
     * @return string
381
     */
382
    public function getClassXoopsFormTextArea($var, $param1, $param2, $param3, $param4, $isParam = false, $t = "\t\t")
383
    {
384
        $area = 'new XoopsFormTextArea( ';
385
        $getVarTextArea = TDMCreateXoopsCode::getInstance()->getXcGetVar('', 'this', $param2, true);
386
        if (false === $isParam) {
387
            $ret = "{$t}\${$var} = {$area}{$param1}, '{$param2}', {$getVarTextArea}, {$param3}, {$param4} );\n";
388
        } else {
389
            $ret = "{$area}{$param1}, '{$param2}', {$getVarTextArea}, {$param3}, {$param4} )";
390
        }
391
392
        return $ret;
393
    }
394
395
    /**
396
     * @public function getClassXoopsFormColorPicker
397
     *
398
     * @param        $var
399
     * @param        $param1
400
     * @param        $param2
401
     * @param        $param3
402
     * @param bool   $isParam
403
     * @param string $t
404
     *
405
     * @return string
406
     */
407
    public function getClassXoopsFormColorPicker($var, $param1, $param2, $param3, $isParam = false, $t = "\t\t")
408
    {
409
        $picker = 'new XoopsFormColorPicker( ';
410
        if (false === $isParam) {
411
            $ret = "{$t}\${$var} = {$picker}{$param1}, '{$param2}', {$param3} );\n";
412
        } else {
413
            $ret = "{$picker}{$param1}, '{$param2}', {$param3} )";
414
        }
415
416
        return $ret;
417
    }
418
419
    /**
420
     * @public function getClassXoopsFormSelectUser
421
     *
422
     * @param        $var
423
     * @param        $param1
424
     * @param        $param2
425
     * @param string $param3
426
     * @param        $param4
427
     * @param bool   $isParam
428
     * @param string $t
429
     *
430
     * @return string
431
     */
432
    public function getClassXoopsFormSelectUser($var, $param1, $param2, $param3, $param4, $isParam = false, $t = "\t\t")
433
    {
434
        $user = 'new XoopsFormSelectUser( ';
435
        $getVarSelectUser = TDMCreateXoopsCode::getInstance()->getXcGetVar('', 'this', $param4, true);
436
        if (false === $isParam) {
437
            $ret = "{$t}\${$var} = {$user}{$param1}, '{$param2}', {$param3}, {$getVarSelectUser} );\n";
438
        } else {
439
            $ret = "{$user}{$param1}, '{$param2}', {$param3}, {$getVarSelectUser} )";
440
        }
441
442
        return $ret;
443
    }
444
445
    /**
446
     * @public function getClassXoopsFormTextDateSelect
447
     *
448
     * @param        $var
449
     * @param        $param1
450
     * @param        $param2
451
     * @param string $param3
452
     * @param        $param4
453
     * @param bool   $isParam
454
     * @param string $t
455
     *
456
     * @return string
457
     */
458
    public function getClassXoopsFormTextDateSelect($var, $param1, $param2, $param3, $param4, $isParam = false, $t = "\t\t")
459
    {
460
        $tdate = 'new XoopsFormTextDateSelect( ';
461
        $getVarTextDateSelect = TDMCreateXoopsCode::getInstance()->getXcGetVar('', 'this', $param3, true);
462
        if (false === $isParam) {
463
            $ret = "{$t}\${$var} = {$tdate}{$param1}, '{$param2}', '', {$getVarTextDateSelect} );\n";
464
        } else {
465
            $ret = "{$tdate}{$param1}, '{$param2}', '', \${$param4} )";
466
        }
467
468
        return $ret;
469
    }
470
471
    /**
472
     * @public function getClassXoopsFormEditor
473
     *
474
     * @param        $var
475
     * @param        $param1
476
     * @param        $param2
477
     * @param        $param3
478
     * @param bool   $isParam
479
     * @param string $t
480
     *
481
     * @return string
482
     */
483
    public function getClassXoopsFormEditor($var, $param1, $param2, $param3, $isParam = false, $t = "\t\t")
484
    {
485
        $editor = 'new XoopsFormEditor( ';
486
        if (false === $isParam) {
487
            $ret = "{$t}\${$var} = {$editor}{$param1}, '{$param2}', \${$param3});\n";
488
        } else {
489
            $ret = "{$editor}{$param1}, '{$param2}', \${$param3})";
490
        }
491
492
        return $ret;
493
    }
494
495
    /**
496
     * @public function getClassXoopsFormCheckBox
497
     *
498
     * @param        $var
499
     * @param        $param1
500
     * @param        $param2
501
     * @param        $param3
502
     * @param bool   $isParam
503
     * @param string $t
504
     *
505
     * @return string
506
     */
507
    public function getClassXoopsFormCheckBox($var, $param1, $param2, $param3, $isParam = false, $t = "\t\t")
508
    {
509
        $checkBox = 'new XoopsFormCheckBox( ';
510
        if (false === $isParam) {
511
            $ret = "{$t}\${$var} = {$checkBox}{$param1}, '{$param2}', {$param3});\n";
512
        } else {
513
            $ret = "{$checkBox}{$param1}, '{$param2}', {$param3})";
514
        }
515
516
        return $ret;
517
    }
518
519
    /**
520
     * @public function getClassXoopsFormRadioYN
521
     *
522
     * @param        $var
523
     * @param        $param1
524
     * @param        $param2
525
     * @param        $param3
526
     * @param bool   $isParam
527
     * @param string $t
528
     *
529
     * @return string
530
     */
531
    public function getClassXoopsFormRadioYN($var, $param1, $param2, $param3, $isParam = false, $t = "\t\t")
532
    {
533
        $radioYN = 'new XoopsFormRadioYN( ';
534
        if (false === $isParam) {
535
            $ret = "{$t}\${$var} = {$radioYN}{$param1}, '{$param2}', \${$param3});\n";
536
        } else {
537
            $ret = "{$radioYN}{$param1}, '{$param2}', \${$param3})";
538
        }
539
540
        return $ret;
541
    }
542
543
    /**
544
     * @public function getClassXoopsFormSelect
545
     *
546
     * @param        $var
547
     * @param        $param1
548
     * @param        $param2
549
     * @param        $param3
550
     * @param null   $param4
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $param5 is correct as it would always require null to be passed?
Loading history...
Documentation Bug introduced by
Are you sure the doc-type for parameter $param4 is correct as it would always require null to be passed?
Loading history...
551
     * @param null   $param5
552
     * @param bool   $isParam
553
     * @param string $t
554
     *
555
     * @return string
556
     */
557
    public function getClassXoopsFormSelect($var, $param1, $param2, $param3, $param4 = null, $param5 = null, $isParam = false, $t = "\t\t")
558
    {
559
        $otherParam = null != $param4 ? ", {$param4}" : (null != $param5 ? ", {$param5}" : '');
560
        $select = 'new XoopsFormSelect( ';
561
        if (false === $isParam) {
562
            $ret = "{$t}\${$var} = {$select}{$param1}, '{$param2}', \${$param3}{$otherParam});\n";
563
        } else {
564
            $ret = "{$select}{$param1}, '{$param2}', \${$param3}{$otherParam})";
565
        }
566
567
        return $ret;
568
    }
569
570
    /**
571
     * @public function getClassXoopsFormTag
572
     *
573
     * @param        $var
574
     * @param        $param1
575
     * @param        $param2
576
     * @param        $param3
577
     * @param        $param4
578
     * @param int    $param5
579
     * @param bool   $isParam
580
     * @param string $t
581
     *
582
     * @return string
583
     */
584
    public function getClassXoopsFormTag($var, $param1, $param2, $param3, $param4, $param5 = 0, $isParam = false, $t = "\t\t")
585
    {
586
        $tag = 'new XoopsFormTag( ';
587
        if (false === $isParam) {
588
            $ret = "{$t}\${$var} = {$tag}'{$param1}', {$param2}, {$param3}, \${$param4}, {$param5} );\n";
589
        } else {
590
            $ret = "{$tag}'{$param1}', {$param2}, {$param3}, \${$param4}, {$param5} )";
591
        }
592
593
        return $ret;
594
    }
595
596
    /**
597
     * @public function getClassXoopsFormButton
598
     *
599
     * @param        $var
600
     * @param        $param1
601
     * @param        $param2
602
     * @param        $param3
603
     * @param        $param4
604
     * @param bool   $isParam
605
     * @param string $t
606
     *
607
     * @return string
608
     */
609
    public function getClassXoopsFormButton($var, $param1, $param2, $param3, $param4, $isParam = false, $t = "\t\t")
610
    {
611
        $button = 'new XoopsFormButton( ';
612
        if (false === $isParam) {
613
            $ret = "{$t}\${$var} = {$button}'{$param1}', '{$param2}', {$param3}, '{$param4}');\n";
614
        } else {
615
            $ret = "{$button}'{$param1}', '{$param2}', {$param3}, '{$param4}')";
616
        }
617
618
        return $ret;
619
    }
620
621
    /**
622
     * @public   function getClassXoopsObjectTree
623
     *
624
     * @param string $var
625
     * @param        $param1
626
     * @param        $param2
627
     * @param        $param3
628
     * @param string $t
629
     *
630
     * @return string
631
     */
632
    public function getClassXoopsObjectTree($var, $param1, $param2, $param3, $t = '')
633
    {
634
        $ret = "{$t}\${$var} = new XoopsObjectTree(\${$param1}, '{$param2}', '{$param3}');\n";
635
636
        return $ret;
637
    }
638
639
    /**
640
     * @public function getClassXoopsMakeSelBox
641
     *
642
     * @param        $var
643
     * @param        $anchor
644
     * @param        $param1
645
     * @param        $param2
646
     * @param string $param3
647
     * @param        $param4
648
     * @param string $t
649
     *
650
     * @return string
651
     */
652
    public function getClassXoopsMakeSelBox($var, $anchor, $param1, $param2, $param3, $param4, $t = '')
653
    {
654
        $getVar = TDMCreateXoopsCode::getInstance()->getXcGetVar('', 'this', $param4, true);
655
        $ret = "{$t}\${$var} = \${$anchor}->makeSelBox( '{$param1}', '{$param2}', '{$param3}', {$getVar}, true );\n";
656
657
        return $ret;
658
    }
659
660
    /**
661
     * @public function getClassAddOption
662
     *
663
     * @param        $var
664
     * @param        $params
665
     * @param string $t
666
     *
667
     * @return string
668
     */
669
    public function getClassAddOption($var, $params, $t = "\t\t")
670
    {
671
        return "{$t}\${$var}->addOption({$params});\n";
672
    }
673
674
    /**
675
     * @public function getClassAddOptionArray
676
     *
677
     * @param        $var
678
     * @param        $params
679
     * @param string $t
680
     *
681
     * @return string
682
     */
683
    public function getClassAddOptionArray($var, $params, $t = "\t\t")
684
    {
685
        return "{$t}\${$var}->addOptionArray({$params});\n";
686
    }
687
688
    /**
689
     * @public function getClassAddElement
690
     *
691
     * @param string $var
692
     * @param string $params
693
     * @param string $t
694
     *
695
     * @return string
696
     */
697
    public function getClassAddElement($var = '', $params = '', $t = "\t\t")
698
    {
699
        return "{$t}\${$var}->addElement({$params});\n";
700
    }
701
702
    /**
703
     * @public function getClassSetDescription
704
     *
705
     * @param        $var
706
     * @param        $params
707
     * @param string $t
708
     *
709
     * @return string
710
     */
711
    public function getClassSetDescription($var, $params, $t = "\t\t")
712
    {
713
        return "{$t}\${$var}->setDescription({$params});\n";
714
    }
715
716
    /**
717
     * @public function getClassSetExtra
718
     *
719
     * @param        $var
720
     * @param        $params
721
     * @param string $t
722
     *
723
     * @return string
724
     */
725
    public function getClassSetExtra($var, $params, $t = "\t\t")
726
    {
727
        return "{$t}\${$var}->setExtra({$params});\n";
728
    }
729
}
730