type hinting on function arguments that are arrays and included brackets...

Included type hinting on function arguments on the second half of the source to be consistent with the rest of the file. 

Also included curly braces on if statements that did not have them to keep with the standard and for readability.