You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
switch ($formattedLine['type']) {
caseRecordTypes::FR10:
// Do something
}
}
Nothing changes in the implementation for for example the AbstractReader but the code becomes more readable.
if(!$recordType = RecordTypes::get($data[0])){
thrownewRecordTypeException(
sprintf(
'ICF record type "%s" does not exist; Allowed ICF record types are %s',
$recordType,
implode(', ', array_keys(RecordTypes::get()))
)
);
}
If you would like me to create a pull request for this I will.
The text was updated successfully, but these errors were encountered:
You might consider changing the RecordTypes to a (simulated) Enum datatype.
The Abstract class for this could be:
The RecordTypes class should than extend the AbstractEnum
Then use it like this:
Nothing changes in the implementation for for example the AbstractReader but the code becomes more readable.
If you would like me to create a pull request for this I will.
The text was updated successfully, but these errors were encountered: