Code Duplication    Length = 13-13 lines in 3 locations

src/Dropbox/Dropbox.php 3 locations

@@ 561-573 (lines=13) @@
558
     * @link https://www.dropbox.com/developers/documentation/http/documentation#files-move
559
     *
560
     */
561
    public function move($fromPath, $toPath)
562
    {
563
        //From and To paths cannot be null
564
        if (is_null($fromPath) || is_null($toPath)) {
565
            throw new DropboxClientException("From and To paths cannot be null.");
566
        }
567
568
        //Response
569
        $response = $this->postToAPI('/files/move', ['from_path' => $fromPath, 'to_path' => $toPath]);
570
571
        //Make and Return the Model
572
        return $this->makeModelFromResponse($response);
573
    }
574
575
    /**
576
     * Copy a file or folder to a different location
@@ 588-600 (lines=13) @@
585
     * @link https://www.dropbox.com/developers/documentation/http/documentation#files-copy
586
     *
587
     */
588
    public function copy($fromPath, $toPath)
589
    {
590
        //From and To paths cannot be null
591
        if (is_null($fromPath) || is_null($toPath)) {
592
            throw new DropboxClientException("From and To paths cannot be null.");
593
        }
594
595
        //Response
596
        $response = $this->postToAPI('/files/copy', ['from_path' => $fromPath, 'to_path' => $toPath]);
597
598
        //Make and Return the Model
599
        return $this->makeModelFromResponse($response);
600
    }
601
602
    /**
603
     * Restore a file to the specific version
@@ 704-716 (lines=13) @@
701
     *
702
     * @throws \Kunnu\Dropbox\Exceptions\DropboxClientException
703
     */
704
    public function getTemporaryLink($path)
705
    {
706
        //Path cannot be null
707
        if (is_null($path)) {
708
            throw new DropboxClientException("Path cannot be null.");
709
        }
710
711
        //Get Temporary Link
712
        $response = $this->postToAPI('/files/get_temporary_link', ['path' => $path]);
713
714
        //Make and Return the Model
715
        return $this->makeModelFromResponse($response);
716
    }
717
718
    /**
719
     * Save a specified URL into a file in user's Dropbox