Commit graph

40 commits

Author SHA1 Message Date
Tim Starling
9af96ef4c7 Improve custom folding and grouping
PHPStorm can use custom folding regions defined in either the
VisualStudio style or the NetBeans style. The VisualStudio style is more
pleasing to the eye and also works as a vim foldmarker. So get rid of
the previous vim foldmarkers, and use region/endregion.

region/endregion need to be in a single-line comment which is not a doc
comment, and the rest of the comment is used as a region heading (by
both PHPStorm and vim). So to retain Doxygen @name tags, it is
necessary to repeat the section heading, once in a @name and once in a
region. Establish a standard style for this, with a divider and three
spaces before the heading, to better set off the heading name in plain
text.

Besides being the previous vim foldmarker, @{ is also a Doxygen
grouping command. However, almost all prior usages of @{ ... @} in this
sense were broken for one reason or another. It's necessary for the @{
to be in a doc comment, and DISTRIBUTE_GROUP_DOC doesn't work if any of
the individual members in the group are separately documented.

@name alone is sufficient to create a Doxygen section when the sections
are adjacent, but if there is ungrouped content after the section, it
is necessary to use @{ ... @} to avoid having the Doxygen group run on.
So I retained, fixed or added @{ ... @} in certain cases.

I wasn't able to test the changes to the trait documentation in Doxygen
since trait syntax is not recognised and the output is badly broken.

Change-Id: I7d819fdb376c861f40bfc01aed74cd3706141b20
2020-12-23 12:41:47 +11:00
Thiemo Kreuz
b0130ca649 Update a lot of unspecific "array" types in PHPDocs
This includes fixing some mistakes, as well as removing
redundant text that doesn't add new information, either because
it literally repeats what the code already says, or is actually
duplicated.

Change-Id: I3a8dd8ce57192deda8916cc444c87d7ab1a36515
2020-10-28 11:01:33 +01:00
Daimona Eaytoy
2b37cfaf18 build: Bump mediawiki-codesniffer to 31.0.0
Done with `composer fix` and suppressing the rest (i.e. sniffs for
global variables, which for core should be suppressed anyway).

Additionally, add `-p` to `phpcbf`, as otherwise it just seems stuck.

Change-Id: Ide8d6cdd083655891b6d654e78440fbda81ab2bc
2020-05-30 14:56:28 +00:00
Reedy
11d2e6009d Fix PSR12.Properties.ConstantVisibility.NotFound in FormOptions.php
Change-Id: I93185e6469cde4238486e7f8fce1c1e2de9351f1
2020-05-15 21:12:06 +00:00
Umherirrender
2664eeb632 Clean up spacing of doc comments
Align the doc stars and normalize start and end tokens

Change-Id: Ib0d92e128e7b882bb5b838bd00c74fc16ef14303
2019-08-05 22:29:50 +00:00
Reedy
9f2ffdfbd4 Remove "Squiz.WhiteSpace.FunctionSpacing" from phpcs exclusions
Change-Id: I78b3315f26ab91b6b443f5b028a635552f82f5a3
2019-05-11 02:44:26 +01:00
Fomafix
9cbb8f104d Use https://www.php.net/ instead of https://secure.php.net/
Change-Id: I0acca592c6909e91b28b904da49dcbd6a43cd2a5
2019-04-12 06:44:48 +02:00
Umherirrender
130ec2523d Fix PhanTypeMismatchDeclaredParam
Auto fix MediaWiki.Commenting.FunctionComment.DefaultNullTypeParam sniff

Change-Id: I865323fd0295aabd06f3e3c75e0e5043fb31069e
2018-07-07 00:34:30 +00:00
Umherirrender
f739a8f368 Improve some parameter docs
Add missing @return and @param to function docs and fixed some @param

Change-Id: I810727961057cfdcc274428b239af5975c57468d
2017-09-10 20:32:31 +02:00
jenkins-bot
69ae945e8d Merge "Update weblinks in comments from HTTP to HTTPS" 2016-11-08 21:32:00 +00:00
Fomafix
202f695f67 Update weblinks in comments from HTTP to HTTPS
Use HTTPS instead of HTTP where the HTTP link is a redirect to the HTTPS link.

Also update some defect links.

Change-Id: Ic3a5eac910d098ed5c2a21e9f47c9b6ee06b2643
2016-11-07 15:24:46 +01:00
addshore
501327550c Fix @since tags of changes that missed the branch
Follows:
FormOptions: I29ae63472536f99f7f9546f30d86e7bd324d3094
MediaWikiServices: Ie5fd2c523ceec8cc2656e749928f38909dc4bdf1
InterwikiLookupAdapter: I387dc2ff3f5564fcedde835dec66781d8e9424fd

Change-Id: I8d99d0b559d04083fb83b0fcf45cde95dab32d64
2016-11-05 09:20:27 +00:00
Sethakill
d115a79923 SpecialActiveUsers: Change checkboxes to dropdown
Moved form to new function and
fixed text about cached version.

Bug: T116354
Change-Id: I29ae63472536f99f7f9546f30d86e7bd324d3094
2016-11-02 12:21:26 +00: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
umherirrender
3b2b6a2773 Add missing @param to function docs
Change-Id: I47fa96a976f55a1a93cb75397285edb8c7f4cd8a
2014-08-14 20:22:52 +02:00
umherirrender
e10ee4304e Adjust indent of some comment blocks
Change-Id: Ic25419490fa6a35c11ccc2b7810527e6661e027c
2014-05-01 18:46:34 +00:00
umherirrender
4c81a710fa Fix formatting of some php docs
php docs of functions should have newline in it and not in one line.

Change-Id: If4a29aefb46a7f73d75593814e597fdb792d5470
2014-03-15 20:49:55 +00:00
Bartosz Dziewoński
9a61734fb7 FormOptions: Implement FLOAT type
Also added WebRequest#getFloat().

Change-Id: I854f09bd26287880a2806852274471904bc33092
2013-11-07 23:50:59 +01:00
Bartosz Dziewoński
23b1590278 FormOptions: Document getValueReal(), consistency fixes
I missed it in my previous doco commit, good opportunity
to try out the fancy new tool.

Change-Id: I52005b243042c3d66250d1cfecfceabbd370ea5c
2013-10-13 13:58:52 +00:00
Siebrand Mazeland
6421d7ea9f Update formatting
Change-Id: If3dd6a1ac4b16479244a847420f0488ba8c51e2b
2013-10-12 17:35:26 +02:00
Bartosz Dziewoński
c30b96efc7 FormOptions: More documentation!
Change-Id: I088b07c1672426c45d995fdf96ac7fc7bda21307
2013-10-12 17:33:53 +02:00
umherirrender
9f14ecf829 Added space after switch/Removed spaces after unset
While at it, added/removed some other spaces in the same files

Change-Id: I84d8001aa123a008807ad5eb76f396aed7c899a4
2013-04-26 16:42:31 +02:00
umherirrender
ef2f507d23 Fixed spacing in files direct in includes folder
Added spaces before if, foreach
Added some braces for one line statements

Change-Id: Ibb8dd102db045522d12ff939075ba7420d95ab6b
2013-04-21 06:38:49 +00:00
Tyler Anthony Romeo
4dcc7961df Fixed @param tags to conform with Doxygen format.
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.

Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
2013-03-11 13:15:01 -04:00
Niklas Laxström
15554b26f7 Fix spelling mistake
Change-Id: I946d0bf5d335a432f453c7a3080686e9500ca2f0
2013-01-14 07:19:29 +00:00
Siebrand Mazeland
7e0d8d597d Fix the little documentation that FormOptions::consumeValue() has
Change-Id: I9a4bfaace4f19ba5e3e8a405118fe1bae3a1696d
2012-12-17 09:30:44 +01:00
umherirrender
85d8ee1f87 Remove a bunch of trailing spaces and unneeded newlines
Change-Id: I00f369641320acd7f087427ef031f3ee7efa0997
2012-10-10 20:14:40 +02:00
Siebrand Mazeland
d4b046a893 Update docs for return and exception info
* Removed some inline tabs in the process.
* IDE fixed some incorrect leading spaces, too.

Change-Id: Ic9303eff6db4424ac3f1fa2816839692b43e6190
2012-10-09 09:41:58 +00:00
Alexandre Emsenhuber
15e9fcca01 Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: Iaebd4e253ff3b35b568e9b394231a5691445ac95
2012-05-14 19:59:58 +02:00
Sam Reed
76246b9bf5 More return documentation 2012-02-09 21:33:27 +00:00
Sam Reed
7b25f8231f Fixing some of the "@return true" or "@return false", need to be "@return bool" and then the metadata can say true if foo, false if bar
Other documentation improvements
2012-02-09 19:30:01 +00:00
Antoine Musso
c1f23144e1 using real identity for hashar
Converting my pseudonym to use my real identity instead:
Ashar Voultoiz -> Antoine Musso
2011-10-24 09:08:13 +00:00
Antoine Musso
cb1b863ab1 FormOptions: adds doc & tests 2011-02-28 20:58:34 +00:00
Alexandre Emsenhuber
85e0c158ee * Standardised file description headers
* added @file where needed
* added file description headers where needed
2010-10-23 14:16:26 +00:00
Siebrand Mazeland
5c1630efa7 Ran stylize.php, removed trailing whitespace, updated indentation and code formatting. 2010-05-30 14:28:54 +00:00
Domas Mituzas
5a1aefd7d8 per http://lt.php.net/ArrayAccess, offsetSet and offsetUnset ar both void and shouldn't be returning data 2010-02-28 17:38:26 +00:00
Alexandre Emsenhuber
bd84f4e6a0 Per r38036: also fix FormOptions 2008-07-25 18:06:29 +00:00
Niklas Laxström
4530268205 * Improvements to FormOptions 2008-06-08 19:23:54 +00:00
Aryeh Gregor
ce49847053 (bug 13816) Filter by main namespace doesn't work on WhatLinksHere. Guess why? Weak PHP typing! I want to assemble a list of all these bugs as a concrete example of why PHP sucks. 2008-04-22 01:05:15 +00:00
Niklas Laxström
1c20683d88 * New helper class for dealing with forms 2008-04-19 17:38:06 +00:00