Php mocker

I tried to make a common template for the function's code.