Code Duplication    Length = 9-9 lines in 2 locations

src/MenuBuilder.php 1 location

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

src/MenuItem.php 1 location

@@ 212-220 (lines=9) @@
209
     */
210
    public function url($url, $title, $order = 0, $attributes = array())
211
    {
212
        if (func_num_args() === 3) {
213
            $arguments = func_get_args();
214
215
            return $this->add([
216
                'url' => Arr::get($arguments, 0),
217
                'title' => Arr::get($arguments, 1),
218
                'attributes' => Arr::get($arguments, 2),
219
            ]);
220
        }
221
222
        return $this->add(compact('url', 'title', 'order', 'attributes'));
223
    }