we don't have official style guide, but please, use be consistent.
here you don't have space between brace and curly brace `){`, but below you have `} else {`. Also there is `for (...) {`.