Code Duplication    Length = 7-10 lines in 2 locations

src/ZohoDatabasePusher.php 2 locations

@@ 139-148 (lines=10) @@
136
     * @param array             $fieldsMatching
137
     * @param array             $row
138
     */
139
    private function insertDataZohoBean(ZohoBeanInterface $zohoBean, array $fieldsMatching, array $row)
140
    {
141
        foreach ($row as $columnName => $columnValue) {
142
            if ((!in_array($columnName, ['id', 'uid']) || isset($fieldsMatching[$columnName])) && !is_null($columnValue)) {
143
                $type = $fieldsMatching[$columnName]['type'];
144
                $value = $this->formatValueToBeans($type, $columnValue);
145
                $zohoBean->{$fieldsMatching[$columnName]['setter']}($value);
146
            }
147
        }
148
    }
149
150
    /**
151
     * Insert data to bean in order to update zoho records.
@@ 158-164 (lines=7) @@
155
     * @param type              $columnName
156
     * @param type              $valueDb
157
     */
158
    private function updateDataZohoBean(ZohoBeanInterface $zohoBean, array $fieldsMatching, $columnName, $valueDb)
159
    {
160
        if (!in_array($columnName, ['id', 'uid']) || (isset($fieldsMatching[$columnName]))) {
161
            $type = $fieldsMatching[$columnName]['type'];
162
            $value = is_null($valueDb) ? $valueDb : $this->formatValueToBeans($type, $valueDb);
163
            $zohoBean->{$fieldsMatching[$columnName]['setter']}($value);
164
        }
165
    }
166
167
    /**