Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public function transform(array $attributes) |
||
19 | { |
||
20 | $mapping = Missive::getRelayProviderConfig(); |
||
21 | |||
22 | foreach ($mapping as $key => $value) { |
||
23 | $$key = $value; |
||
24 | } |
||
25 | |||
26 | $transformer = [ |
||
27 | $from => phone($attributes[$from], 'PH')->formatE164(), |
||
|
|||
28 | $to => phone($attributes[$to], 'PH')->formatE164(), |
||
29 | $message => trim($attributes[$message]), |
||
30 | ]; |
||
31 | |||
32 | return $transformer; |
||
33 | } |
||
34 | } |
||
35 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.