RemovedImplodeFlexibleParamOrder: fix two bugs + one enhancement by jrfnl · Pull Request #891 · PHPCompatibility/PHPCompatibility

@jrfnl

Bugs:
1. "Empty" tokens (whitespace, comments) were not disregarded when determining whether the first parameter was only a text string, which could lead to the second parameter being examined when it doesn't need to be.
2. If either parameter contained a ternary, potentially nested in some other construct, the ternary would confuse the sniff.

Both fixed now.

In addition to this if one of the parameters contains an `(array)` cast, let's presume that's the array parameter. This may lead to some false positives for complexly build parameters, but we'll deal with that later if needs be.

Includes unit tests.

Fixes 890