Refactoring `DocumentSchema::cast()` to reduce complexity.
Refactoring `DocumentSchema::cast()` to reduce complexity.

davidpersson/lithium,muyehub/lithium,SensCritique/lithium,graphis/lithium,graphis/lithium,mehlah/lithium,whowgames/lithium,UnionOfRAD/lithium,pixelcog/lithium,jails/lithium,m4rcsch/lithium-core-library,pixelcog/lithium,UnionOfRAD/lithium,mehlah/lithium,qoqa/lithium,davidpersson/lithium,datachand/lithium,qoqa/lithium,m4rcsch/lithium-core-library,jails/lithium,muyehub/lithium,wbeater/lithium,datachand/lithium,whowgames/lithium,SensCritique/lithium,wbeater/lithium