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

@@ 127-135 (lines=9) @@
124
        ];
125
        $method = isset($methods[$action]) ? $methods[$action] : '';
126
127
        if ($this->serviceApiCall->send($method, $apiUri, $options) === true) {
128
            $res = $this->serviceApiCall->last('success');
129
130
            if (in_array($action, $returnDataFor) === true) {
131
                $res = $this->serviceApiCall->getData();
132
            }
133
        } else {
134
            $this->message = $this->serviceApiCall->getMessage();
135
        }
136
137
        return $res;
138
    }