Commit graph

8 commits

Author SHA1 Message Date
Umherirrender
aed646001c htmlform: Add missing documentation to class properties
Add doc-typehints to class properties found by the PropertyDocumentation
sniff to improve the documentation.

Once the sniff is enabled it avoids that new code is missing type
declarations. This is focused on documentation and does not change code.

Change-Id: I1f306a3925d6768209a06e70082598b2f70cd319
2024-09-14 11:49:05 +00:00
Dogu
bbc74d93b0 Refactor widget classes to use cleaner namespacing
This patch refactors various widget classes in the includes/widget
directory to use cleaner namespacing. The patches remove redundant backslash
prefixes in class extending statements and add use statements for OOUI classes
and other MediaWiki-specific classes. This patch improves readability and
maintainability of the code by following the MediaWiki coding conventions and
leverages the benefits of PHP's namespacing system.

List of affected classes:
- CheckMatrixWidget
- DateInputWidget
- DateTimeInputWidget
- NamespaceInputWidget
- SearchInputWidget
- SelectWithInputWidget
- SizeFilterWidget
- SpinnerWidget
- TagMultiselectWidget
- TitleInputWidget
- UserInputWidget

Additionally, the code now correctly documents exceptions thrown by
constructors where missing, enforcing clearer developer expectations.

Change-Id: I0fdaf68a412a1c3b7049a79222f4dbeaa95a6bbc
2024-01-02 23:24:56 +00:00
Thiemo Kreuz
e23b070b45 Make use of ?? and ?: operators where it makes sense
Change-Id: I1d9d62d80b17d1a05222c6e82f631cb801c311a8
2022-08-04 21:43:12 +02:00
Kunal Mehta
0535765366 widget: Fix changes of copyright year
Fixes up e8b10f6804.

Change-Id: I474e508a2bd4d783272eda87c1cc91f5597bc1b1
2018-01-24 12:07:34 -08:00
Thiemo Mättig
e8b10f6804 Simplify documentation headers of includes/widgets/…Widget.php files
Most notably: The documentation header repeats the file name. This
appears to be fully automatically generated, but does not add helpful
information.

Change-Id: I9edf15dd25ef6cc52fe931fffde69f0bd9042474
2018-01-10 13:44:05 +01:00
Umherirrender
23ef520a1c Improve some parameter docs
Change-Id: I31e983d7ac287158101b18ad95779d83537302a2
2018-01-07 11:39:08 +01:00
Thiemo Mättig
544122a6c2 Remove self-explaining "section heading" comments from classes
I can see that "parent::__construct" literally calls the parent
constructor. I can see that stuff preceeded by the keyword "protected"
is protected. I really (really) don't need comments explaining such.

Change-Id: I7458e714976a6acd3ba6a7c93fdc27d03903df83
2017-12-28 16:12:08 +01:00
Brad Jorsch
12bdc84219 HTMLForm: Add HTMLDateTimeField
And to do that, an OOUI PHP widget for
mw.widgets.datetime.DateTimeInputWidget too.

Bug: T146340
Change-Id: Iaa8b5892b6c3a1f3698cef59684cc3cdc9d483ea
2016-09-26 12:08:56 -04:00