Commit graph

11 commits

Author SHA1 Message Date
Umherirrender
512aadac31 Use type declaration for class properties holding type hinted arguments
Provided arguments already have type declaration on the construtor
and it is safe to use the same type on the class property

Change-Id: Ia8bbdc4dee59dfb487582dd514486ec8542951be
2024-09-11 20:08:50 +00:00
James D. Forrester
bc662aec9b Move Language and friends into Language namespace
Bug: T353458
Change-Id: Id3202c0c4f4a2043bf97b7caee081acab684155c
2024-08-10 13:36:30 +02:00
Thiemo Kreuz
6805f39a30 Remove unused default values from class properties
In all these cases the property is unconditionally set in
the constructor. The extra initialisation is effectively
dead code and an extra source of errors and confusion.

Change-Id: Icae13390d5ca5c14e2754f3be4eb956dd7f54ac4
2021-05-12 13:44:28 +02:00
Kunal Mehta
c381dd0a99 Enable "PhanTypeInvalidRightOperand" phan checks
HTMLFormField subclasses triggered false positives when phan incorrectly
thought that $this->mOptions was only a boolean.

ReplacementArray $this->data was defined as possibly being boolean, but
in reality that never happened.

Change-Id: I06bae9c9952366ff7927df37373b146d570f4a02
2018-05-17 23:27:42 -07:00
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
Max Semenik
b41307acc0 Drop FastStringSearch support from ReplacementArray
It's not needed after a PHP 5.5 switch

Change-Id: I989f39d59878039d8cc320af957a90982e48d08d
2016-02-10 08:16:33 +00:00
Kunal Mehta
f127fa161e Fix spacing in ReplacementArray
Change-Id: I8cb23892a06ebd8ad0f0726e8a6f4c853d0eb4c3
2015-09-25 10:54:58 -07:00
Ori Livneh
a37e25c3e5 Only use FastStringSearch on PHP <5.5
The native implementation of strtr( $str, $replace_pairs ) matches the
performance of FastStringSearch since http://bugs.php.net/63893 has been
resolved. HHVM's implementation does too, since PR facebook/hhvm#5471.

Change-Id: I20374d37bbb9958188a0487abc5b50f08ce40840
2015-09-03 22:53:15 +00:00
Liangent
ca38682dda LanguageConverter fix of empty and numeric strings
Bug: T51072
Bug: T48634
Bug: T53551
Change-Id: I2c88f1cf7c0014bebf5c798916b660b334a0b78b
2015-06-08 14:23:42 +00:00
Kunal Mehta
5a2277d719 ReplacementArray: Set explicit visiblity on functions
Also add a type-hint

Change-Id: I78a322dfa11a71e22a3d0b7064b808aec6bfbf83
2015-01-28 21:28:56 -08:00
Kunal Mehta
89b3502322 Move ReplacementArray into includes/libs/
Change-Id: I95b748c77522027753fb5bd0237f25e254938c16
2015-01-28 21:21:46 -08:00