fixed a brace according to the coding standard

changed the word "twice" to "again" in phpdoc
also the brace of `if` should go on the next line
thanks @EvanPurkhiser