Code Duplication    Length = 9-9 lines in 2 locations

src/MenuItem.php 1 location

@@ 205-213 (lines=9) @@
202
     */
203
    public function url($url, $title, $order = 0, $attributes = array())
204
    {
205
        if (func_num_args() == 3) {
206
            $arguments = func_get_args();
207
208
            return $this->add([
209
                'url' => array_get($arguments, 0),
210
                'title' => array_get($arguments, 1),
211
                'attributes' => array_get($arguments, 2),
212
            ]);
213
        }
214
215
        return $this->add(compact('url', 'title', 'order', 'attributes'));
216
    }

src/MenuBuilder.php 1 location

@@ 427-435 (lines=9) @@
424
     */
425
    public function url($url, $title, $order = 0, $attributes = array())
426
    {
427
        if (func_num_args() == 3) {
428
            $arguments = func_get_args();
429
430
            return $this->add([
431
                'url' => $this->formatUrl(array_get($arguments, 0)),
432
                'title' => array_get($arguments, 1),
433
                'attributes' => array_get($arguments, 2),
434
            ]);
435
        }
436
437
        $url = $this->formatUrl($url);
438