PSR compliance [ci skip]
Added test for pass-by-reference to generator.