Code Duplication    Length = 7-7 lines in 3 locations

framework/web/Request.php 3 locations

@@ 118-124 (lines=7) @@
115
     *
116
     * @return mixed Value of the field, NULL otherwise.
117
     */
118
    public static function _post($fieldName, $defaultValue = null) {
119
        $fieldValue = self::getFieldValue($fieldName, Http::POST);
120
        if (is_null($fieldValue) && !is_null($defaultValue)) {
121
            return $defaultValue;
122
        }
123
124
        return $fieldValue;
125
    }
126
127
    /**
@@ 101-107 (lines=7) @@
98
     *
99
     * @return mixed Value of the field, NULL otherwise.
100
     */
101
    public static function _get($fieldName, $defaultValue = null) {
102
        $fieldValue = self::getFieldValue($fieldName, Http::GET);
103
        if (is_null($fieldValue) && !is_null($defaultValue)) {
104
            return $defaultValue;
105
        }
106
107
        return $fieldValue;
108
    }
109
110
    /**
@@ 135-141 (lines=7) @@
132
     *
133
     * @return mixed Value of the field, NULL otherwise.
134
     */
135
    public static function _field($fieldName, $defaultValue = null) {
136
        $fieldValue = self::getFieldValue($fieldName);
137
        if (is_null($fieldValue) && !is_null($defaultValue)) {
138
            return $defaultValue;
139
        }
140
141
        return $fieldValue;
142
    }
143
144
    /**