Merged methods I need from phptidy code