| Conditions | 4 |
| Paths | 6 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | public function setTransaction($transactionID, $data) |
||
| 35 | { |
||
| 36 | $decryptedData = $this->getDecryptedData($data); |
||
| 37 | |||
| 38 | foreach ($decryptedData->transactions->transaction as $transaction) { |
||
| 39 | if ($transactionID == (int)$transaction->id) { |
||
| 40 | $this->transaction = $transaction; |
||
| 41 | break; |
||
| 42 | } |
||
| 43 | } |
||
| 44 | |||
| 45 | if (!$this->transaction) { |
||
| 46 | $this->transaction = false; |
||
| 47 | } |
||
| 48 | |||
| 49 | return $this; |
||
| 50 | } |
||
| 78 |