arrange indentions and add php docs