|
@@ 326-335 (lines=10) @@
|
| 323 |
|
* @param int $records The amount of records to check/reduce. |
| 324 |
|
* @return int The enforced maximum amount of records. |
| 325 |
|
*/ |
| 326 |
|
protected function _enforceRecordMaximum($records) { |
| 327 |
|
if (isset($this->_maxRecords) && $records > $this->_maxRecords) { |
| 328 |
|
$this->out(__('%s records exceed the allowed maximum amount. Reducing it to %s records.', |
| 329 |
|
$records, $this->_maxRecords), 1, Shell::VERBOSE); |
| 330 |
|
|
| 331 |
|
return $this->_maxRecords; |
| 332 |
|
} |
| 333 |
|
|
| 334 |
|
return $records; |
| 335 |
|
} |
| 336 |
|
|
| 337 |
|
/** |
| 338 |
|
* Enforce the minimum amount of records to be seeded |
|
@@ 343-352 (lines=10) @@
|
| 340 |
|
* @param int $records The amount of records to check/increase. |
| 341 |
|
* @return int The enforced minimum amount of records. |
| 342 |
|
*/ |
| 343 |
|
protected function _enforceRecordMinimum($records) { |
| 344 |
|
if (isset($this->_minRecords) && $records < $this->_minRecords) { |
| 345 |
|
$this->out(__('%s records fall below the allowed minimum amount. Increasing it to %s records.', |
| 346 |
|
$records, $this->_minRecords), 1, Shell::VERBOSE); |
| 347 |
|
|
| 348 |
|
return $this->_minRecords; |
| 349 |
|
} |
| 350 |
|
|
| 351 |
|
return $records; |
| 352 |
|
} |
| 353 |
|
|
| 354 |
|
/** |
| 355 |
|
* Get whether or not to validate seeding |