@@ 214-221 (lines=8) @@ | ||
211 | * |
|
212 | * @return void |
|
213 | */ |
|
214 | private function handleInvalidFormat() |
|
215 | { |
|
216 | $errorMessage = "The data in column $this->schemaColumn->name on row $this->rowNumber doesn't "; |
|
217 | $errorMessage .= "match the required format of $this->format."; |
|
218 | $this->setError(self::ERROR_INVALID_FORMAT, $errorMessage); |
|
219 | $this->statistics['rows_with_errors'][] = $this->rowNumber; |
|
220 | $this->valid = false; |
|
221 | } |
|
222 | ||
223 | ||
224 | /** |
|
@@ 267-274 (lines=8) @@ | ||
264 | * |
|
265 | * @return void |
|
266 | */ |
|
267 | private function handleInvalidPattern() |
|
268 | { |
|
269 | $errorMessage = "The data in column $this->schemaColumn->name on row $this->rowNumber doesn't "; |
|
270 | $errorMessage .= "match the required pattern of $this->pattern."; |
|
271 | $this->setError(self::ERROR_INVALID_PATTERN, $errorMessage); |
|
272 | $this->statistics['rows_with_errors'][] = $this->rowNumber; |
|
273 | $this->valid = false; |
|
274 | } |
|
275 | ||
276 | ||
277 | /** |
@@ 194-202 (lines=9) @@ | ||
191 | * |
|
192 | * @return void |
|
193 | */ |
|
194 | private function handleDuplicateHash($existingKey) |
|
195 | { |
|
196 | $primaryKeyColumns = implode(', ', $this->primaryKeyFields); |
|
197 | $errorMessage = "The data in columns "$primaryKeyColumns" should be unique, |
|
198 | but rows $existingKey & $this->rowNumber have the same values of "$this->hash""; |
|
199 | ||
200 | $this->setError(self::ERROR_DUPLICATE_PRIMARY_KEY, $errorMessage); |
|
201 | $this->statistics['rows_with_errors'][] = $this->rowNumber; |
|
202 | } |
|
203 | } |