Code Duplication    Length = 13-13 lines in 2 locations

includes/WebRequest.php 2 locations

@@ 156-168 (lines=13) @@
153
     *
154
     * @return null|string
155
     */
156
    public static function postString($key)
157
    {
158
        $post = &self::$globalStateProvider->getPostSuperGlobal();
159
        if (!array_key_exists($key, $post)) {
160
            return null;
161
        }
162
163
        if ($post[$key] === "") {
164
            return null;
165
        }
166
167
        return (string)$post[$key];
168
    }
169
170
    /**
171
     * @param string $key
@@ 290-302 (lines=13) @@
287
     *
288
     * @return null|string
289
     */
290
    public static function getString($key)
291
    {
292
        $get = &self::$globalStateProvider->getGetSuperGlobal();
293
        if (!array_key_exists($key, $get)) {
294
            return null;
295
        }
296
297
        if ($get[$key] === "") {
298
            return null;
299
        }
300
301
        return (string)$get[$key];
302
    }
303
304
    #endregion
305