Add phpmd
Move block out of else
Remove unused var
Remove unused var