In a loop I want a trait to populate the member variables.
Problem:
My IDE tells me:
Array and String Offset access syntax with curly braces is no longer supported.
My code
use CustomTrait;
private function mapUserData($mapping, $userData){
foreach($mapping as $owerKey => $theirKey) {
$this->set{$owerKey} = $userData[$theirKey];
}
}