Fixed code violations in rte_events.lib.php

Signed-off-by: Chanaka Indrajith <pe.chanaka.ck@gmail.com>
Fixed code violation in rte_triggers.lib.php

Signed-off-by: Chanaka Indrajith <pe.chanaka.ck@gmail.com>
Fixed some code violations in rte_words.lib.php

Signed-off-by: Chanaka Indrajith <pe.chanaka.ck@gmail.com>