Code Duplication    Length = 8-10 lines in 2 locations

src/Core/Http/Request.php 2 locations

@@ 117-124 (lines=8) @@
114
     * @param null $default
115
     * @return array|mixed|null
116
     */
117
    public function post($name = null, $default = null)
118
    {
119
        if (is_null($name)) {
120
            return $this->request->all();
121
        }
122
        $result = $this->request->get($name);
123
        return $result?$result:$default;
124
    }
125
126
    /**
127
     * @param $name
@@ 167-176 (lines=10) @@
164
     * @param null $default
165
     * @return array|mixed|null
166
     */
167
    public function query($name = null, $default = null)
168
    {
169
        if (is_null($name)) {
170
            return $this->query->all();
171
        }
172
173
        $result = $this->query->get($name);
174
175
        return $result?$result:$default;
176
    }
177
178
    /**
179
     * @param $name