| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function prepareRow(Row $row) { |
||
| 16 | if ($value = $row->getSourceProperty('Title')) { |
||
| 17 | $strings = explode(' ', $value); |
||
| 18 | $first_name = $strings[0]; |
||
| 19 | $last_name = $strings[1]; |
||
| 20 | $password = \Drupal::service('password')->hash('password'); |
||
| 21 | $row->setSourceProperty('Name', $first_name . $last_name); |
||
| 22 | $row->setSourceProperty('First', $first_name); |
||
| 23 | $row->setSourceProperty('Last', $last_name); |
||
| 24 | $row->setSourceProperty('Pass', $password); |
||
| 25 | $row->setSourceProperty('Status', 1); |
||
| 26 | $row->setSourceProperty('Mail', $first_name . $last_name . '@example.com'); |
||
| 27 | } |
||
| 30 |