Commit graph

18 commits

Author SHA1 Message Date
Umherirrender
130ec2523d Fix PhanTypeMismatchDeclaredParam
Auto fix MediaWiki.Commenting.FunctionComment.DefaultNullTypeParam sniff

Change-Id: I865323fd0295aabd06f3e3c75e0e5043fb31069e
2018-07-07 00:34:30 +00:00
Bartosz Dziewoński
4fd27f006f Use PHP 5.6 '**' operator instead of 'pow()' function
Change-Id: Ieb22e1dbfcffaa4e7b3dcfabbcc999e5dd59a4bf
2018-05-30 18:05:19 -07:00
Umherirrender
be42e09aa8 build: Prepare for mediawiki/mediawiki-codesniffer to 0.9.0
The used phpcs has a bug, so the version 0.9.0 could not be enforced at the moment.
Will be fixed in next version, see T167168

Changed:
- Remove duplicate newline at end of file
- Add space between function and ( for closures
- and -> &&, or -> ||

Change-Id: I4172fb08861729bccd55aecbd07e029e2638d311
2017-06-26 17:14:31 +00:00
Reedy
e86a6310f7 Move some more classes to comply with class per file
Change-Id: Ibecea848fcca24709847931f5e02a7c981c4d277
2017-05-21 13:23:31 +01:00
Thiemo Mättig
00c3f09566 Remove empty lines from PHP and JavaScript comment blocks
This is a pure documentation change. It mostly removes empty lines from
comments (and entirely empty comments), as well as adds a few missing
documentation blocks and fixes a minor mistake. I hope it's ok to have
this in one patch. I can split it, please tell me.

Change-Id: I9668338602ac77b903ab6b02ff56bd52743c37c4
2016-12-09 09:01:06 +00:00
Bartosz Dziewoński
a0723d50ff ZipDirectoryReader: Don't try to parse zero-length files
With the current code, 'zip-bad' would be returned (eventually). I think
'zip-wrong-format' is a more correct response. This prevents weird errors
when trying to upload such a file (and results in saner errors instead).

Change-Id: Ic2c010f318d98df4783da1cf5126e8dd88aa9014
2016-03-24 10:15:10 +01: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
Reedy
4d9143c7f5 Add lots of @throws
Change-Id: I09d0c13070f966fcf23d2638d8fc1328279a5995
2014-12-24 13:49:20 +00:00
umherirrender
6b4c44c2db Add missing @param to function docs
Change-Id: Ib26407bc55dff7969d8a3b1e2ae51751b202d8fb
2014-08-18 16:24:59 +00:00
jenkins-bot
d61a436ac7 Merge "Fixed some @params documentation (includes/utils)" 2014-07-23 18:33:25 +00:00
umherirrender
d435aa2c58 Fixed some @params documentation (includes/utils)
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: I9bd4ef370016cbbcce42d2612031a264eb3de61b
2014-07-21 20:58:14 +02:00
Kevin Israel
d3b172af3b Remove Fallback::iconv()
The iconv fallback is, for the most part, a remnant of PHP 4 support.
Though iconv was not enabled by default in PHP 4, it is in PHP 5. This
is the case even for Windows builds, which use GNU libiconv.

As for the major Linux distributions:

* Debian, CentOS, Ubuntu -> always enabled
* Fedora, Slackware -> .so in the same package, enabled by default
* Arch -> .so in the same package, disabled by default
* openSUSE -> separate package

Change-Id: Ie1112a5742646a0e1f951e188480c23851859320
2014-07-21 00:36:22 -04:00
Thiemo Mättig
c10b4698f0 Fix broken @return documentation
I found one of these in Wikibase and run a global search.

Change-Id: I76c1519a47d7222f136272c59ea454b650808a86
2014-05-24 22:06:01 +02:00
Siebrand Mazeland
3328266ed6 Declare visibility on class properties
Set to protected, so they are accessible when subclassed. Grepped core and
a little over 600 extensions for usage. Only usage found in UploadBase.php
and no direct usage of class properties.

Change-Id: Icb3a43867670f140f05643379c7acad34c6518c1
2013-11-07 22:39:48 +01:00
Siebrand Mazeland
192639e0ea Declare visibility on class property
Checked core and extensions for possible usage. Found no occurrences. Make
protected, so it is accessible when subclassed.

Change-Id: I5f25cbaf20215bce9c9d614c76df906c6b9cba93
2013-11-07 22:34:34 +01:00
Siebrand Mazeland
7a95d47961 Address some PHP CodeSniffer errors and warnings
Change-Id: I495481e3532834f1f8a45cda9402d609de7e2bd7
2013-11-07 22:32:16 +01:00
Siebrand Mazeland
655a03d26f Update formatting
Change-Id: I5ec6257295261caab6cb2d9eb9d32ce76cae08a2
2013-11-04 10:29:25 +01:00
Tim Starling
e4bcbe722e Introduce includes/utils directory
These are classes that provide facilities for use by any caller, are
independent of user interface, and have a limited set of dependencies on
the rest of MediaWiki. See the README file for a more precise
definition.

These classes cannot go in includes/libs because of a dependency on the
MediaWiki framework, such as wfDebug() or MWException, but they are
otherwise similar. I thought it would be useful to put them in their own
directory, to make them more discoverable, and as part of a general
program of reducing clutter in the base includes/ directory.

I've probably missed a few classes which could be included here, but the
following classes were considered and were rejected for now:

* Fallback: single caller only
* GitInfo: getViewers() has inappropriate dependencies
* HttpFunctions: depends on configuration, $wgTitle
* PoolCounter: depends on configuration
* CacheHelper: depends on IContextSource, wfMemc()

Also moved a couple of classes into libs/ instead, where that seemed to
be more appropriate.

Change-Id: I274cff805b7d694b728a89b764a049cd62d320fe
2013-11-04 11:00:42 +11:00
Renamed from includes/ZipDirectoryReader.php (Browse further)