Fix errors reported by psalm.
Fix errors reported by psalm.

ADmad/cakephp,cakephp/cakephp,ndm2/cakephp,ADmad/cakephp,cakephp/cakephp,cakephp/cakephp,cakephp/cakephp,ADmad/cakephp,CakeDC/cakephp,dakota/cakephp,CakeDC/cakephp,ndm2/cakephp,dakota/cakephp,ADmad/cakephp,dakota/cakephp,ndm2/cakephp,dakota/cakephp,ndm2/cakephp,CakeDC/cakephp,CakeDC/cakephp