Code Duplication    Length = 9-9 lines in 2 locations

src/Harvest.php 1 location

@@ 151-159 (lines=9) @@
148
        ];
149
        $method = isset($methods[$action]) ? $methods[$action] : '';
150
151
        if ($this->serviceApiCall->send($method, $apiUri, $options) === true) {
152
            $res = $this->serviceApiCall->last('success');
153
154
            if (in_array($action, $returnDataFor) === true) {
155
                $res = $this->serviceApiCall->getData();
156
            }
157
        } else {
158
            $this->message = $this->serviceApiCall->getMessage();
159
        }
160
161
        return $res;
162
    }

src/Toggl.php 1 location

@@ 162-170 (lines=9) @@
159
        ];
160
        $method = isset($methods[$action]) ? $methods[$action] : '';
161
162
        if ($this->serviceApiCall->send($method, $apiUri, $options) === true) {
163
            $res = $this->serviceApiCall->last('success');
164
165
            if (in_array($action, $returnDataFor) === true) {
166
                $res = $this->serviceApiCall->getData();
167
            }
168
        } else {
169
            $this->message = $this->serviceApiCall->getMessage();
170
        }
171
172
        return $res;
173
    }