FormRaw::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php namespace XoopsModules\Tdmcreate\Form;
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
 * FormRaw - raw form element.
14
 *
15
 * This class has special treatment by xoopsforms, it will render the raw
16
 * value provided without wrapping in HTML
17
 *
18
 * @category  Xoops\Form\Raw
19
 *
20
 * @author    trabis <[email protected]>
21
 * @copyright 2012-2014 XOOPS Project (https://xoops.org)
22
 * @license   GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
23
 *
24
 * @link      https://xoops.org
25
 * @since     2.6.0
26
 */
27
28
class FormRaw extends \XoopsFormElement
29
{
30
    /**
31
     * __construct.
32
     *
33
     * @param string $value value
34
     */
35
    public function __construct($value = '')
36
    {
37
        $this->setValue($value);
0 ignored issues
show
Bug introduced by
The method setValue() does not exist on XoopsModules\Tdmcreate\Form\FormRaw. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

37
        $this->/** @scrutinizer ignore-call */ 
38
               setValue($value);

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
38
    }
39
40
    /**
41
     * render.
42
     *
43
     * @return string rendered form element
44
     */
45
    public function render()
46
    {
47
        return $this->getValue();
0 ignored issues
show
Bug introduced by
The method getValue() does not exist on XoopsModules\Tdmcreate\Form\FormRaw. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

47
        return $this->/** @scrutinizer ignore-call */ getValue();

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
48
    }
49
}
50