Code Duplication    Length = 7-10 lines in 2 locations

src/ZohoDatabasePusher.php 2 locations

@@ 199-208 (lines=10) @@
196
     * @param array             $fieldsMatching
197
     * @param array             $row
198
     */
199
    private function insertDataZohoBean(ZohoBeanInterface $zohoBean, array $fieldsMatching, array $row)
200
    {
201
        foreach ($row as $columnName => $columnValue) {
202
            if ((!in_array($columnName, ['id', 'uid']) || isset($fieldsMatching[$columnName])) && !is_null($columnValue)) {
203
                $type = $fieldsMatching[$columnName]['type'];
204
                $value = $this->formatValueToBeans($type, $columnValue);
205
                $zohoBean->{$fieldsMatching[$columnName]['setter']}($value);
206
            }
207
        }
208
    }
209
210
    /**
211
     * Insert data to bean in order to update zoho records.
@@ 218-224 (lines=7) @@
215
     * @param type              $columnName
216
     * @param type              $valueDb
217
     */
218
    private function updateDataZohoBean(ZohoBeanInterface $zohoBean, array $fieldsMatching, $columnName, $valueDb)
219
    {
220
        if (!in_array($columnName, ['id', 'uid']) || (isset($fieldsMatching[$columnName]))) {
221
            $type = $fieldsMatching[$columnName]['type'];
222
            $value = is_null($valueDb) ? $valueDb : $this->formatValueToBeans($type, $valueDb);
223
            $zohoBean->{$fieldsMatching[$columnName]['setter']}($value);
224
        }
225
    }
226
227
    /**