Scalar casts are still allowed (for now), because there's a huge amount
of false positives. Ditto for invalid array offsets.
Thoughts about the rest: luckily, many false positives with array offsets
have gone. Moreover, since *Internal issues are suppressed in the base
config, we can remove inline suppressions.
Unfortunately, there are a couple of new issues about array additions
with only false positives, because apparently they don't take
branches into account.
Change-Id: I5a3913c6e762f77bfdae55051a395fae95d1f841
It was wrongly assuming that if the description started with
a dollar sign, that that first word would be the variable name
it was documenting, thus leading to some oddly documented
class members, such as from:
> SimpleCallbacks.php:
> /** @var (string|string[])[] $_GET/$_POST data */
Fix this by capturing the first word and actually comparing
it to the variable name we're about to document.
Keep the overall behaviour the same as before, that is,
if the description does indeed start with the correct variable
name, then don't modify it in any way (already covered by test).
Change-Id: I48ed20cf75f146a30d5976fcad3a72d5a9a4906b