aboutsummaryrefslogtreecommitdiffstats
path: root/languages/ConverterRule.php
Commit message (Collapse)AuthorAgeFilesLines
* language: Move ConverterRule to includes/ and add test caseTimo Tijhof2019-08-261-498/+0
| | | | | | | | | Add a very basic test that creates an instance, invokes it with an empty string, and asserts the types and values returned by the public methods used in LanguageConverter::applyManualConv. Bug: T225756 Change-Id: I3600260e712f019243ba5f00890011e694444e43
* Merge "Accept BCP 47 codes in LanguageConverter rules"jenkins-bot2018-11-271-9/+11
|\
| * Accept BCP 47 codes in LanguageConverter rulesC. Scott Ananian2018-10-161-9/+11
| | | | | | | | | | | | | | | | | | | | Facilitate a gradual migration away from non-standard MediaWiki language codes. This will ensure that (a) rules can be written with standard BCP 47 codes, and (b) rules written with existing nonstandard codes will continue to work once these are added to LanguageCode::$deprecatedLanguageCodeMapping. Change-Id: I3ba96faafaf40bd47fb5919621f7035f0431a698
* | Use PHP 7 '??' operator instead of if-then-elseFomafix2018-10-271-5/+1
| | | | | | | | Change-Id: Ia86f8433f30a166d38ee63d0d1745b26740767b9
* | Minor cleanup of languages/ConverterRule.phpAlangi Derick2018-10-241-4/+4
|/ | | | | | | Remove extra space before comma and fix minor issues with line comments. Change-Id: I0306fe172eaa29ab504394f0a80b8652089a809c
* Fix PhanTypeMismatchDeclaredParamUmherirrender2018-07-071-1/+1
| | | | | | Auto fix MediaWiki.Commenting.FunctionComment.DefaultNullTypeParam sniff Change-Id: I865323fd0295aabd06f3e3c75e0e5043fb31069e
* Remove auto-generated "Constructor" documentation on constructorsThiemo Mättig2017-07-211-2/+0
| | | | | | | | | | | Having such comments is worse than not having them. They add zero information. But you must read the text to understand there is nothing you don't already know from the class and the method name. This is similar to I994d11e. Even more trivial, because this here is about comments that don't say anything but "constructor". Change-Id: I474dcdb5997bea3aafd11c0760ee072dfaff124c
* Fix typo in comment.C. Scott Ananian2017-06-271-1/+1
| | | | Change-Id: Ia656c55ca22fa30b5a911b8cb3a6218c916d3316
* Improve code suffering from PHP 5.3's lack of support for foo()[]Bartosz Dziewoński2016-02-281-9/+4
| | | | | | | | | I searched for /\$(\S+) = (.+?\(.*?\);)\n.*?\$\1\[/, ignored everything involving isset(), unset() or array assigments, then skimmed through the remaining results and changed things where they made sense. These changes were not automated, so please review them. Change-Id: Ib37b4c66fc57648470f151ad412210b3629c2538
* Convert all array() syntax to []Kunal Mehta2016-02-171-21/+21
| | | | | | | | | | 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
* LanguageConverter fix of empty and numeric stringsLiangent2015-06-081-11/+15
| | | | | | | Bug: T51072 Bug: T48634 Bug: T53551 Change-Id: I2c88f1cf7c0014bebf5c798916b660b334a0b78b
* Implemented hasRules()Evan McIntire2014-12-281-2/+3
| | | | | | | hasRules() looks at $mRules and returns true for a non-empty string, and false for an empty one Change-Id: Ia7a1316498dc3f2753f61134705c9bd80fc9caeb
* Fixed some @params documentation (languages)umherirrender2014-04-171-3/+3
| | | | | | | | Swapped some "$var type" to "type $var" or added missing types before the $var. Changed some other types to match the more common spelling. Makes beginning of some text in captial. Change-Id: I7a4dec6a8de96ee21ef34e52bb755f723aa3b0e6
* Move ConverterRule class to its own fileaddshore2014-04-081-0/+502
Change-Id: I0d743625e32f903ecd13f3c1f5aaeabdaca70f9d