Code Duplication    Length = 9-15 lines in 2 locations

src/Uploadable.php 2 locations

@@ 508-516 (lines=9) @@
505
     * @param string $uploadField
506
     * @return string
507
     */
508
    public
509
    function getUploadFileUrl(
510
        string $uploadField
511
    ) : string
512
    {
513
        $url = addFinalSlash($this->getUploadFileBasePath($uploadField)).  $this->{$uploadField};
514
515
        return $url == '' ? '' : $this->getUploadOptionsOrDefault()->storage->url($url);
516
    }
517
518
    /**
519
     * get a path and remove public_path.
@@ 550-564 (lines=15) @@
547
     * @param string $uploadField
548
     * @return string
549
     */
550
    public
551
    function getUploadFileBaseUrl(
552
        string $uploadField
553
    ) : string
554
    {
555
        $uploadFieldPath = $this->getUploadFileBasePath($uploadField);
556
        /*dump($uploadFieldPath);
557
        $uploadFieldPath = canonicalize(addFinalSlash($this->removePublicPath($uploadFieldPath)));*/
558
559
        if ($this->isSlashOrEmptyDir($uploadFieldPath)) {
560
            return '';
561
        }
562
563
        return addFinalSlash($this->getUploadOptionsOrDefault()->storage->url($uploadFieldPath));
564
    }
565
566
    /**
567
     * Calcolate the new name for ALL uploaded files and set relative upload attributes