The proof is unnecessarily long and complicated. First of all Morera's Theorem is used only to get an entire function $g$ and you can do this without Morera's Theorem also. Just use the power series expansion.
Note that $g(z) \to 0$ as $ |z| \to \infty$. This implies that $g$ is a bounded entire function. By Louiville's Theorem $g$ is a constant. But then $f(z)=az+b$ for some $a$ and $b$ and the hypothesis implies that $a=0$.
The proof is unnecessarily long and complicated. First of all Morera's Theorem is used only to get an entire function $g$ and you can do this without Morera's Theorem also. Just use the power series expansion.
Note that $g(z) \to 0$ as $ |z| \to \infty$. This implies that $g$ is a bounded entire function. By Louiville's Theorem $g$ is a constant. But then $f(z)=az+b$ for some $a$ and $b$ and the hypothesis implies that $a=0$.