Updated code to match PSR-2