Code Duplication    Length = 13-19 lines in 2 locations

src/Harvest.php 1 location

@@ 136-154 (lines=19) @@
133
     * @param  string  $apiUri
134
     * @return mixed
135
     */
136
    protected function timerAction($action, $apiUri, array $options = [])
137
    {
138
        $returnDataFor = [
139
            'start',
140
            'timer_running',
141
            'get_projects',
142
            'get_tags',
143
            'get_recent_timers',
144
        ];
145
146
        $method = $this->methodForAction($action);
147
148
        return $this->serviceApiCall->send(
149
            $method,
150
            $apiUri,
151
            $options,
152
            in_array($action, $returnDataFor)
153
        );
154
    }
155
156
    /**
157
     * @param  $needle

src/Toggl.php 1 location

@@ 158-170 (lines=13) @@
155
     * @param  string  $apiUri
156
     * @return mixed
157
     */
158
    protected function timerAction($action, $apiUri, array $options = [])
159
    {
160
        $returnDataFor = ['start', 'get_recent_timers', 'get_online_data'];
161
162
        $method = $this->methodForAction($action);
163
164
        return $this->serviceApiCall->send(
165
            $method,
166
            $apiUri,
167
            $options,
168
            in_array($action, $returnDataFor)
169
        );
170
    }
171
172
    /**
173
     * @param  $needle