Code Duplication    Length = 4-5 lines in 2 locations

src/Harvest.php 1 location

@@ 180-184 (lines=5) @@
177
178
        $method = isset($methods[$action]) ? $methods[$action] : '';
179
180
        if ($this->serviceApiCall->send($method, $apiUri, $options) === false) {
181
            $this->message = $this->serviceApiCall->getMessage();
182
183
            return false;
184
        }
185
186
        if (in_array($action, $returnDataFor) === true) {
187
            return $this->serviceApiCall->getData();

src/Toggl.php 1 location

@@ 136-139 (lines=4) @@
133
        ];
134
        $method = isset($methods[$action]) ? $methods[$action] : '';
135
136
        if ($this->serviceApiCall->send($method, $apiUri, $options) === false) {
137
            $this->message = $this->serviceApiCall->getMessage();
138
139
            return false;
140
        }
141
142
        if (in_array($action, $returnDataFor) === true) {