Commit graph

15 commits

Author SHA1 Message Date
Thiemo Kreuz a8f835c30a Raise PHP coding standards in this codebase a bit
Re-enabling some specific rules that are disabled in the upstream
MediaWiki coding standard for several reasons.

Change-Id: I6922995098f9af21e62e1b40d20fabd4b5d74ef7
2021-11-08 13:34:29 +01:00
Thiemo Kreuz ad014c834d Fix a series of minor style issues in PHP code
* Mismatching capitalization.
* Unused pieces of code.
* Properties that can be constants.
* Use $this->getConfig() in special pages.

Change-Id: Ia7e2c438c5ddd3c770070701e4cbdfc79fccf009
2021-06-03 15:55:38 +02:00
libraryupgrader 738c3b3a34 build: Updating eslint-config-wikimedia to 0.18.2
Additional changes:
* Dropped .php5 and .inc files from .phpcs.xml (T200956).

Change-Id: I869e10c268d28dc059aecb11ea941c2d928e400c
2021-03-05 04:41:47 +00:00
libraryupgrader 7248ad6332 build: Updating mediawiki/mediawiki-codesniffer to 32.0.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate
* MediaWiki.Commenting.PropertyDocumentation.WrongStyle
* MediaWiki.Usage.ExtendClassUsage.FunctionConfigUsage

Additional changes:
* Removed globals `OO`, `require`, included via `wikimedia/mediawiki` profile (T262222).

Change-Id: If161f46db0a1f35126fecec141e29d15fa4f2532
2020-10-28 17:50:11 +00:00
Thiemo Kreuz 1230e25cbf Add missing constant visibility keywords
Not used outside of this class. Confirmed via CodeSearch.

Change-Id: I8ffed9ed88bc60e7529d277df5b474d85437ed6e
2020-09-09 16:59:39 +02:00
Umherirrender a7497703a7 Fix new documentation sniffs
Change-Id: If9fc2d1d29aefdcb61a5f69c28f7d50c86b3ac4a
2020-01-10 16:28:16 -08:00
libraryupgrader 6afa14fe4d build: Updating mediawiki/mediawiki-codesniffer to 29.0.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag

Change-Id: If59d450236a7d1afa3c6a05536abea819535f984
2020-01-10 17:51:43 +00:00
James D. Forrester 2479f5c7f8 Drop use of wgParser, replaced in 1.32 and to be removed in 1.35
Bug: T160811
Change-Id: Id7332a19d64d83bcbccfd3ac89464dfea593cdc2
2019-10-28 20:10:14 +00:00
James D. Forrester dec54cf56e build: Upgrade mediawiki-codesniffer to v28.0.0
Change-Id: I23702d16eee09292b63051f94103a3bca3b1dd13
2019-10-11 12:42:23 -07:00
James D. Forrester 358d2fa01c .phpcs.xml: Drop unnecessary exclusions
Already ignored, or don't have any PHP files.

Change-Id: I644148617e2d6ce2fdb1d406ca2cc9c2b5aabbd7
2019-04-05 17:43:18 -07:00
libraryupgrader 36ef6d856f build: Updating mediawiki/mediawiki-codesniffer to 24.0.0
The following sniffs are failing and were disabled:
* MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgParser
* MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgTitle

The following sniffs was renamed:
* MediaWiki.VariableAnalysis.ForbiddenGlobalVariables.ForbiddenGlobal$wgTitle

Change-Id: Iabe2a787bae7fe299bed548c0097613ff5493a0d
2019-02-06 18:33:13 +00:00
James D. Forrester 31f667ccf7 doc: Document all public and protected PHP functions
Also move the maintenane script to a name that makes
MediaWiki.Files.ClassMatchesFilename.NotMatch not error,
and use the more restrictive licence tag usage for
MediaWiki.Commenting.LicenseComment.InvalidLicenseTag.

Change-Id: Ifa5518cd590ae83c6fd76f1dbb5a2ce40de4b119
2018-03-28 12:50:44 -07:00
libraryupgrader 0c6e488c2f build: Updating mediawiki/mediawiki-codesniffer to 17.0.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.LicenseComment.InvalidLicenseTag

Change-Id: I9e8470d0a967fdab4b410aa999cc98d52fb780e8
2018-03-28 18:28:05 +00:00
James D. Forrester 1c6e9f216d phpcs: Don't try to be smart about excluding VE, it doesn't work
Change-Id: I3ca8b5c408a9331e4d5daada6a6c1624e30667e5
2018-02-07 12:31:09 -08:00
libraryupgrader d87af9e4c8 build: Updating mediawiki/mediawiki-codesniffer to 14.1.0
And moved phpcs.xml to .phpcs.xml (T177256).

Change-Id: If86bc95b7dfb48180e741c729e9ded195992908b
2017-10-21 03:00:17 +00:00
Renamed from phpcs.xml (Browse further)