Fixed MethodScanner that on latest prm value fails

Unit test for this case added anyway
Merge pull request #5472 in master
Merge commit 'refs/pull/5125/head' of github.com:zendframework/zf2 into hotfix/5125
[#5125] Trim default vale at assignment time
Forward port #5125