Code Duplication    Length = 13-19 lines in 2 locations

src/Harvest.php 1 location

@@ 123-141 (lines=19) @@
120
     * @param  string  $apiUri
121
     * @return mixed
122
     */
123
    protected function timerAction($action, $apiUri, array $options = [])
124
    {
125
        $returnDataFor = [
126
            'start',
127
            'timer_running',
128
            'get_projects',
129
            'get_tags',
130
            'get_recent_timers',
131
        ];
132
133
        $method = $this->methodForAction($action);
134
135
        return $this->serviceApiCall->send(
136
            $method,
137
            $apiUri,
138
            $options,
139
            in_array($action, $returnDataFor)
140
        );
141
    }
142
143
    /**
144
     * @param  $needle

src/Toggl.php 1 location

@@ 145-157 (lines=13) @@
142
     * @param  string  $apiUri
143
     * @return mixed
144
     */
145
    protected function timerAction($action, $apiUri, array $options = [])
146
    {
147
        $returnDataFor = ['start', 'get_recent_timers', 'get_online_data'];
148
149
        $method = $this->methodForAction($action);
150
151
        return $this->serviceApiCall->send(
152
            $method,
153
            $apiUri,
154
            $options,
155
            in_array($action, $returnDataFor)
156
        );
157
    }
158
159
    /**
160
     * @param  $needle