Closed hexus closed 9 years ago
Implemented as above. PHPUnit tests succeeded absolutely fine on the first attempt.
Successful extraction was successful. As a side effect, developers can also implement their own transformers for their own active record classes if they want. They just need to override Record::getAttributeAccessor()
and Record::getAttributeMutator()
.
Model::mutate()
andModel::access()
are rated critical by scrutinizer because of the switch statements.Extract this logic to a couple of new classes:
Maybe also add interfaces for these so that they can be overridden/extended.