Commit graph

5 commits

Author SHA1 Message Date
Umherirrender
8de3b7d324 Use static closures where safe to use
This is micro-optimization of closure code to avoid binding the closure
to $this where it is not needed.

Created by I25a17fb22b6b669e817317a0f45051ae9c608208

Change-Id: I0ffc6200f6c6693d78a3151cb8cea7dce7c21653
2021-02-11 00:13:52 +00:00
Umherirrender
a1de8b8700 Tests: Mark more more closures as static
Result of a new sniff I25a17fb22b6b669e817317a0f45051ae9c608208

Bug: T274036
Change-Id: I695873737167a75f0d94901fa40383a33984ca55
2021-02-09 02:55:57 +00:00
Thiemo Kreuz
2f66b3754f tests: Remove @param docs from test code that just repeat the signature
These are not only 100% identical to the actual code, but also:
* It's error-prone. Some are already wrong.
* These test…() functions are not meant to be called from
  anywhere. What is the target audience for this documentation?
* There is a @dataProvider. What such @param tags actually do is
  document the provider, but in an odd place. Just looking at
  the provider should give the same information.
* The MediaWiki CodeSniffer allows to skip @param when there is
  a @dataProvider, for the reasone listed.

Change-Id: I0f6f42f9a15776df944a0da48a50f9d5a2fb6349
2021-01-21 03:41:23 +00:00
Timo Tijhof
72fda163e2 debug: Assert native deprecation in DeprecatablePropertyArrayTest
Avoid the complexity of MWDebug added in 2704be7df8.

Motivated by I1d4a166b6dff8b, which makes the native deprecation happen
always, and would otherwise make this test fail since native warnings
become exceptions in PHPUnit.

Change-Id: I83f19c26bb69b8aa5d1a91f7aa286aad56f5e64d
2020-06-17 15:23:52 +00:00
Petr Pchelko
2704be7df8 Introduce DeprecatablePropertyArray and use it for PageUpdater
Bug: T250638
Change-Id: I53e39be59228ac5a57f34d51d733d1647331889c
2020-06-09 07:09:00 -07:00