Fix phpdoc and function scope

rather than ``element``, I would say ``adapter``