waldoj/statedecoded — pull request #216 by dtrebbien (2013-02-10 23:20:55+00:00)
Title: Adjust handling of $structure and $components having different counts

This reverses the handling of the case `count($structure) > count($components)`; rather than hack off ending structure elements, hack off beginning elements.

For example, if http://sunshinestatutes.local/1.01/ is visited, `$components` will have one element and if the `STRUCTURE` constant is not changed from the default, `$structure` is the array 'title', 'chapter', 'section'. I believe this means that if `count($structure) > count($components)`, we need to hack off extra elements from the *beginning* so that '1.01' is treated as a section.