Make cake's codesniffer happy

I would also suggest changing the `RuntimeException`s thrown to `CakeException`. I can make a separate PR for it.