Remove closing syntax from php files and enforce validation of token being present when constructing the logger