Re-fixes #3931: brace on the next line 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