aboutsummaryrefslogtreecommitdiffstats
path: root/includes/diff/DiffEngine.php
Commit message (Collapse)AuthorAgeFilesLines
* Fix numerous Squiz.Scope.MethodScope.MissingReedy2020-05-151-1/+1
| | | | Change-Id: I7a5aa8555e94a0bcb97b37ec6f8ca854de7c5575
* Set method visibility for various constructorsUmherirrender2019-12-031-1/+1
| | | | Change-Id: Id3c88257e866923b06e878ccdeddded7f08f2c98
* Improve param docsUmherirrender2019-11-281-1/+1
| | | | Change-Id: I746a69f6ed01c3ff000da125457df62b02d13b34
* Upgrade phan config to 0.7.1Daimona Eaytoy2019-09-041-1/+0
| | | | | | | | This allows us to remove many suppressions for phan false positives. Bug: T231636 Depends-On: I82a279e1f7b0fdefd3bb712e46c7d0665429d065 Change-Id: I5c251e9584a1ae9fb1577afcafb5001e0dcd41c7
* Unsuppress phan issues part 6Daimona Eaytoy2019-09-011-0/+3
| | | | | | Bug: T231636 Depends-On: I50377746f01749b058c39fd8229f9d566224cc43 Change-Id: I2cd24e73726394e3200a570c45d5e86b6849bfa9
* Simplify a few binary checks for bit 1Thiemo Kreuz2019-05-171-3/+3
| | | | | | | | | ( $var & 1 ) is either 0 or 1, which can be used as a boolean value. The main advantage of this is that there is no confusion with the operator precedence. In `$var & 1 !== 1` the `!==` is executed first, effectively turning it into `$var & 0`. This always succeeds. Change-Id: I53c81a3891d42b2660eefc311f1f0f2523104894
* Make use of the list() feature where it makes senseThiemo Kreuz2019-03-241-3/+1
| | | | | | | | | | This code is functionally identical, but less error prone (not so easy to forget or mix these numerical indexes). This patch happens to touch the Parser, which might be a bit scary. We can remove this file from this patch if you prefer. Change-Id: I8cbe3a9a6725d1c42b86e67678c1af15fbc5961a
* Move class RangeDifference to own fileUmherirrender2019-03-081-37/+0
| | | | Change-Id: I5262c7484017a0d920cc24297515d5946f614ee6
* Use PHP 5.6 '**' operator instead of 'pow()' functionBartosz DziewoƄski2018-05-301-1/+1
| | | | Change-Id: Ieb22e1dbfcffaa4e7b3dcfabbcc999e5dd59a4bf
* Don't globally disable PHPCS's prohibition of assert()Kunal Mehta2018-05-071-0/+3
| | | | | | | | Whitelist the remaining usages of assert(), and reinstate the PHPCS sniff that forbids usage of it. Add FIXME comments as well, so any casual readers of the code will not think that the disabling and usage is intentional. Change-Id: I7cabe715c0e6aa6a9ef3ffe5657f3de7fd8e662b
* Remove empty lines at begin of function, if, foreach, switchUmherirrender2017-07-011-1/+0
| | | | | | Organize phpcs.xml a bit Change-Id: Ifb767729b481b4b686e6d6444cf48b1f580cc478
* PHP code style: No space after unary not operatorFomafix2017-01-051-2/+2
| | | | Change-Id: I4d3df0cfcda4d88e405164123893e57786fbe15e
* Rethink diff limitsMax Semenik2016-06-011-0/+17
| | | | | | | | | | | | | | | | | | | | Now, instead of "if your changed paragraphs are larger than 10Kb, you're screwed": * Instead of relying on overall length, estimate complexity after splitting to words and taking any equal head and tail out of equation. * Estimate based on words changed, which better reflects the actual complexity of generating a diff. * New limit is determined scientifically, i.e. "above that number XDebug starts complaining about recursion limits reached in Vagrant". Caveat: if new limits are hit, the consequences are more widespread as all adjacent changed paragraphs are displayed without word level diffs, as opposed to only the paragraph that's too long being affected. However, the new limit is much higher and in wikitext you're supposed to put empty lines between paragraphs anyway, negating this problem. Bug: T128697 Change-Id: I4e91c7c40f5afdd116b847a859b8517522302489
* Improve diff docsMax Semenik2016-05-181-2/+12
| | | | Change-Id: I42332051f6f1b94f459b06d6c69625bc2a1fa9cf
* Merge Wikidiff3 into DiffEngineMax Semenik2016-05-181-0/+815
Change-Id: Ib4d083a5200824e4d032de6921c375e455e77fb2