Code Duplication    Length = 7-10 lines in 2 locations

src/ZohoDatabasePusher.php 2 locations

@@ 155-164 (lines=10) @@
152
     * @param array             $fieldsMatching
153
     * @param array             $row
154
     */
155
    private function insertDataZohoBean(ZohoBeanInterface $zohoBean, array $fieldsMatching, array $row)
156
    {
157
        foreach ($row as $columnName => $columnValue) {
158
            if ((!in_array($columnName, ['id', 'uid']) || isset($fieldsMatching[$columnName])) && !is_null($columnValue)) {
159
                $type = $fieldsMatching[$columnName]['type'];
160
                $value = $this->formatValueToBeans($type, $columnValue);
161
                $zohoBean->{$fieldsMatching[$columnName]['setter']}($value);
162
            }
163
        }
164
    }
165
166
    /**
167
     * Insert data to bean in order to update zoho records.
@@ 174-180 (lines=7) @@
171
     * @param type              $columnName
172
     * @param type              $valueDb
173
     */
174
    private function updateDataZohoBean(ZohoBeanInterface $zohoBean, array $fieldsMatching, $columnName, $valueDb)
175
    {
176
        if (!in_array($columnName, ['id', 'uid']) || (isset($fieldsMatching[$columnName]))) {
177
            $type = $fieldsMatching[$columnName]['type'];
178
            $value = is_null($valueDb) ? $valueDb : $this->formatValueToBeans($type, $valueDb);
179
            $zohoBean->{$fieldsMatching[$columnName]['setter']}($value);
180
        }
181
    }
182
183
    /**