add some tests for the `weight` functionnality

deprecated the addBoostFactorFunction
fix PSR-2 coding standard