Formatted some code, noticed by SensioLabsInsight

* In both locations, anonymous function variables need to be casted as
the expected objects
Merge pull request #184 from elcodi/feature/casting-objects-anonymous-functions

Formatted some code, noticed by SensioLabsInsight