| Conditions | 4 |
| Paths | 5 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function valid() |
||
| 28 | { |
||
| 29 | $valid = parent::valid(); |
||
| 30 | if(! $valid) { |
||
| 31 | $this->commitIfInTransaction(); |
||
| 32 | return false; |
||
| 33 | } |
||
| 34 | if($this->currentStep >= $this->batchSize) { |
||
| 35 | $this->currentStep = self::START_TRANSACTION; |
||
| 36 | $this->commitIfInTransaction(); |
||
| 37 | } |
||
| 38 | if(self::START_TRANSACTION == $this->currentStep) { |
||
| 39 | $this->pdo->beginTransaction(); |
||
| 40 | $this->inTransaction = true; |
||
| 41 | $this->currentStep = 0; |
||
| 42 | } |
||
| 43 | return true; |
||
| 44 | } |
||
| 45 | |||
| 77 |