update code to the psr-2 standard