New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP4 constructors, preg_replace, method naming for subclasses #31
Conversation
Fixed method naming checks, it didn't work for subclasses
It's just a partial fix for #28 though as it doesn't check for the namespace. Simply checking if there's a namespace defined in the same file would be simple, but it could then skip issues for the following (crappy yet allowed) syntax:
|
Improved array_splice() for tokens
Alright, namespace check for PHP4 style constructs is done as well ... |
Hello. Have you tested it? |
Hi,
A couple of times with several different files, the final version works
just fine for me. It did throw some warnings after the 2nd or 3rd commit,
so please be careful in case you don't want to merge them all.
Is there any reason why you had the array_splice() for the method checks
strip from $class_start until $i - $class_start instead of 0 to $i?
BR,
Flo
…On Wed, Aug 22, 2018 at 3:44 PM Sergey ***@***.***> wrote:
Hello. Have you tested it?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#31 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAco1q4M1aeTCmkqHXPQZ4ey-M0iev_fks5uTWAegaJpZM4WFYDb>
.
|
That's to remove only tokens within |
Thanks for pr! |
Hi,
Your tool really helped us with migrating to PHP 7.2, so I'm glad I could
help at least a bit in return.
BR,
Flo
…On Sat, Aug 25, 2018 at 4:51 PM Sergey ***@***.***> wrote:
Thanks for pr!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#31 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAco1g09nrw4wJh4G4d87H4WZ4yJSWKCks5uUWRmgaJpZM4WFYDb>
.
|
I've fixed issue #28 with the second commit. The first one fixes another preg_replace delimiter issue, it's also allowed to use single-/double-quotes as delimiters. Also the method naming check didn't work for subclasses (eg. class SubClass extends ParentClass) as there were more tokens than just 5 to get after the first opening brace.