Closed staabm closed 4 months ago
iirc, the rule was configured to prefer using this or self, then seems changed to non configurable for change to self, which maybe make personal preference for call parent assert methods.
in phpunit the methods are declared as static
, which leads to a endless number of phpstan errors, when using $this
variants.
I don't think its a matter of taste.
I recall that sebastian said calling this or via self is just equal, I checked on https://phpstan.org/r/ce3b2725-899d-4369-9502-b367dc90d2f6 and it seems green, it probably some phpstan extension that force it?
ok, the notice shown when "strict rules" in phpstan demo clicked https://phpstan.org/r/12c7bd74-0e7f-4910-9fc5-c5b8be59ea06 , so probably still preference, since if strict rules not activated, it still working ok without notice.
hmm I see .. valid points.
Indeed, this rule is to fit personal preference.
I wonder why the PreferPHPUnitSelfCallRector is not part of any setlist?