Code Duplication    Length = 6-6 lines in 2 locations

src/Harvest.php 1 location

@@ 81-86 (lines=6) @@
78
79
        $data = $this->timerAction('start', 'add', ['json' => $item]);
80
81
        if (isset($data['id']) === true) {
82
            $this->setMessage('timer started');
83
            $harvestId = $data['id'];
84
        } else {
85
            $this->setMessage('could not start timer! [' . $this->message . ']');
86
        }
87
88
        return $harvestId;
89
    }

src/Toggl.php 1 location

@@ 109-114 (lines=6) @@
106
107
        $data = $this->timerAction('start', 'time_entries/start', ['json' => $item]);
108
109
        if (isset($data['data']['id']) === true) {
110
            $this->setMessage('timer started');
111
            $togglId = $data['data']['id'];
112
        } else {
113
            $this->setMessage('could not start timer! [' . $this->message . ']');
114
        }
115
116
        return $togglId;
117
    }