Both `$object` and `$attribute` should be passed as parameters.