also advance to end of array for object-based observers

This is a backport to the 2.5 branch, see the following:

https://github.com/joomla/joomla-cms/commit/791f5612ac7305f94789411f4c3fc459c91077a5
Merge pull request #3505 from danslo/patch-1

also advance to end of array for object-based observers
CodeMirror 3.16 for Joomla 2.5
Codemirror 3.18
passes phpcs
CodeMirror 3.19
Standardize param names to camelCase.
CodeMirror 3.20
The way to get syntax is different from 2.5x to 3.2
Codemirror 3.21
Codemirror 3.22 - see codemirror.net for release notes
Use multiplexing addon
CodeMirror 4.0 - multiple selections and other goodies
bigger default font size (13) and support for legacy fullscreen key combo
CodeMirror 4.1
Codemirror 4.2