Code Duplication    Length = 11-11 lines in 3 locations

src/Uri.php 3 locations

@@ 385-395 (lines=11) @@
382
    /**
383
     * {@inheritdoc}
384
     */
385
    public function withHost($host)
386
    {
387
        if (!is_string($host)) {
388
            throw new \InvalidArgumentException('Invalid host argument');
389
        }
390
391
        $uri = clone $this;
392
        $uri->host = $host;
393
394
        return $uri;
395
    }
396
397
    /**
398
     * {@inheritdoc}
@@ 419-429 (lines=11) @@
416
    /**
417
     * {@inheritdoc}
418
     */
419
    public function withPath($path)
420
    {
421
        if (!is_string($path)) {
422
            throw new \InvalidArgumentException('Invalid path argument');
423
        }
424
425
        $uri = clone $this;
426
        $uri->path = $path;
427
428
        return $uri;
429
    }
430
431
    /**
432
     * {@inheritdoc}
@@ 449-459 (lines=11) @@
446
    /**
447
     * {@inheritdoc}
448
     */
449
    public function withFragment($fragment)
450
    {
451
        if (!is_string($fragment)) {
452
            throw new \InvalidArgumentException('Invalid fragment argument');
453
        }
454
455
        $uri = clone $this;
456
        $uri->fragment = $fragment;
457
458
        return $uri;
459
    }
460
461
    /**
462
     * {@inheritdoc}