[GIT-PULLS] [php-src] PR #23230: gen_stub.php clean up and small refactoring

[email protected] (kamil-tekiela)
Newsgroups php.git-pulls
Message-ID <[email protected]>
Pull Request: https://github.com/php/php-src/pull/23230
Author: kamil-tekiela

When I opened the file, my IDE reported multiple errors and warnings. I fixed the easy-to-fix ones. 

There is one remaining bug with `getFieldSynopsisValueString` which is protected and not visible from EnumCaseInfo, but I am not sure how that was supposed to work so I didn't touch it. 

@kocsismate I have split up the changes into separate commits so that you can reject commits you don't like or that break something.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.