public static function fromJson($data) { if (!is_null($data)) { $customerInformation = new CustomerInformation(); $customerInformation->convertData($data); $customerInformation->convertDataToCustomer($data); return $customerInformation; } }