| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 59 | public function requireDefaultRecords() |
||
| 60 | { |
||
| 61 | foreach($this->Config()->get('default_records') as $key => $value) { |
||
| 62 | $filter = [ |
||
| 63 | 'Key' => $key |
||
| 64 | ]; |
||
| 65 | |||
| 66 | $obj = SalesforceDefaultContactField::get()->filter($filter)->first(); |
||
| 67 | if(! $obj) { |
||
| 68 | $obj = SalesforceDefaultContactField::create($filter); |
||
| 69 | $obj->Value = $value; |
||
| 70 | $obj->write(); |
||
| 71 | } |
||
| 101 |