Conditions | 5 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
35 | public function reverseTransform($str): array |
||
36 | { |
||
37 | if (null === $str || '' === $str || !is_string($str)) { |
||
38 | return []; |
||
39 | } |
||
40 | |||
41 | try { |
||
42 | return preg_split('/[ ,]+/', $str, -1, PREG_SPLIT_NO_EMPTY); |
||
43 | } catch (PcreException $e) { |
||
44 | throw new TransformationFailedException(sprintf('It was not possible to convert the string "%s" to an array of emails', $str), 0, $e); |
||
45 | } |
||
48 |