Code Duplication    Length = 13-13 lines in 3 locations

src/Dropbox/Dropbox.php 3 locations

@@ 555-567 (lines=13) @@
552
     * @link https://www.dropbox.com/developers/documentation/http/documentation#files-move
553
     *
554
     */
555
    public function move($fromPath, $toPath)
556
    {
557
        //From and To paths cannot be null
558
        if (is_null($fromPath) || is_null($toPath)) {
559
            throw new DropboxClientException("From and To paths cannot be null.");
560
        }
561
562
        //Response
563
        $response = $this->postToAPI('/files/move', ['from_path' => $fromPath, 'to_path' => $toPath]);
564
565
        //Make and Return the Model
566
        return $this->makeModelFromResponse($response);
567
    }
568
569
    /**
570
     * Copy a file or folder to a different location
@@ 582-594 (lines=13) @@
579
     * @link https://www.dropbox.com/developers/documentation/http/documentation#files-copy
580
     *
581
     */
582
    public function copy($fromPath, $toPath)
583
    {
584
        //From and To paths cannot be null
585
        if (is_null($fromPath) || is_null($toPath)) {
586
            throw new DropboxClientException("From and To paths cannot be null.");
587
        }
588
589
        //Response
590
        $response = $this->postToAPI('/files/copy', ['from_path' => $fromPath, 'to_path' => $toPath]);
591
592
        //Make and Return the Model
593
        return $this->makeModelFromResponse($response);
594
    }
595
596
    /**
597
     * Restore a file to the specific version
@@ 697-709 (lines=13) @@
694
     *
695
     * @throws \Kunnu\Dropbox\Exceptions\DropboxClientException
696
     */
697
    public function getTemporaryLink($path)
698
    {
699
        //Path cannot be null
700
        if (is_null($path)) {
701
            throw new DropboxClientException("Path cannot be null.");
702
        }
703
704
        //Get Temporary Link
705
        $response = $this->postToAPI('/files/get_temporary_link', ['path' => $path]);
706
707
        //Make and Return the Model
708
        return $this->makeModelFromResponse($response);
709
    }
710
711
    /**
712
     * Save a specified URL into a file in user's Dropbox