Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/AbstractMediawikiObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ abstract class AbstractMediawikiObject
*
* @since 1.0
*/
public function __construct(Registry $options = null, Http $client = null)
public function __construct(?Registry $options = null, ?Http $client = null)
{
$this->options = $options ?? new Registry();
$this->client = $client ?? new Http($this->options->toArray());
Expand Down
16 changes: 8 additions & 8 deletions src/Categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ class Categories extends AbstractMediawikiObject
*/
public function getCategories(
array $titles,
array $clprop = null,
array $clshow = null,
?array $clprop = null,
?array $clshow = null,
$cllimit = null,
$clcontinue = false,
array $clcategories = null,
?array $clcategories = null,
$cldir = null
) {
// Build the request.
Expand Down Expand Up @@ -157,9 +157,9 @@ public function getCategoryMembers(
$cmtitle = null,
$cmpageid = null,
$cmlimit = null,
array $cmprop = null,
array $cmnamespace = null,
array $cmtype = null,
?array $cmprop = null,
?array $cmnamespace = null,
?array $cmtype = null,
$cmstart = null,
$cmend = null,
$cmstartsortkey = null,
Expand Down Expand Up @@ -273,7 +273,7 @@ public function enumerateCategories(
$acmin = null,
$acmax = null,
$aclimit = null,
array $acprop = null
?array $acprop = null
) {
// Build the request.
$path = '?action=query&list=allcategories';
Expand Down Expand Up @@ -330,7 +330,7 @@ public function enumerateCategories(
*
* @since 1.0
*/
public function getChangeTags(array $tgprop = null, $tglimit = null)
public function getChangeTags(?array $tgprop = null, $tglimit = null)
{
// Build the request.
$path = '?action=query&list=tags';
Expand Down
2 changes: 1 addition & 1 deletion src/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Http extends BaseHttp
*
* @since 12.3
*/
public function __construct($options = [], TransportInterface $transport = null)
public function __construct($options = [], ?TransportInterface $transport = null)
{
parent::__construct($options, $transport);

Expand Down
4 changes: 2 additions & 2 deletions src/Images.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function getImagesUsed(array $titles)
* @since 1.0
*/
public function getImageInfo(
array $liprop = null,
?array $liprop = null,
$lilimit = null,
$listart = null,
$liend = null,
Expand Down Expand Up @@ -184,7 +184,7 @@ public function enumerateImages(
$aidir = null,
$aisha1 = null,
$aisha1base36 = null,
array $aiprop = null,
?array $aiprop = null,
$aimime = null
) {
// Build the request.
Expand Down
4 changes: 2 additions & 2 deletions src/Links.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Links extends AbstractMediawikiObject
*
* @since 1.0
*/
public function getLinks(array $titles, array $plnamespace = null, $pllimit = null, $plcontinue = null, array $pltitles = null, $pldir = null)
public function getLinks(array $titles, ?array $plnamespace = null, $pllimit = null, $plcontinue = null, ?array $pltitles = null, $pldir = null)
{
// Build the request.
$path = '?action=query&prop=links';
Expand Down Expand Up @@ -258,7 +258,7 @@ public function enumerateLinks(
$alto = null,
$alprefix = null,
$alunique = null,
array $alprop = null,
?array $alprop = null,
$alnamespace = null,
$allimit = null
) {
Expand Down
2 changes: 1 addition & 1 deletion src/Mediawiki.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class Mediawiki
*
* @since 1.0
*/
public function __construct(Registry $options = null, Http $client = null)
public function __construct(?Registry $options = null, ?Http $client = null)
{
$this->options = $options ?? new Registry();
$this->client = $client ?? new Http($this->options->toArray());
Expand Down
10 changes: 5 additions & 5 deletions src/Pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ public function changeProtection($title, $protections, $expiry = null, $reason =
*
* @since 1.0
*/
public function getPageInfo(array $titles, array $inprop = null, array $intoken = null, $incontinue = null)
public function getPageInfo(array $titles, ?array $inprop = null, ?array $intoken = null, $incontinue = null)
{
// Build the request
$path = '?action=query&prop=info';
Expand Down Expand Up @@ -419,7 +419,7 @@ public function getPageProperties(array $titles, $ppcontinue = null, $ppprop = n
*
* @since 1.0
*/
public function getRevisions(array $titles, array $rvprop = null, $rvparse = null, $rvlimit = null)
public function getRevisions(array $titles, ?array $rvprop = null, $rvparse = null, $rvlimit = null)
{
// Build the request
$path = '?action=query&prop=revisions';
Expand Down Expand Up @@ -461,7 +461,7 @@ public function getRevisions(array $titles, array $rvprop = null, $rvparse = nul
*/
public function getPageTemplates(
array $titles,
array $tlnamespace = null,
?array $tlnamespace = null,
$tllimit = null,
$tlcontinue = null,
$tltemplates = null,
Expand Down Expand Up @@ -518,7 +518,7 @@ public function getBackLinks(
$bltitle,
$blpageid = null,
$blcontinue = null,
array $blnamespace = null,
?array $blnamespace = null,
$blfilterredirect = null,
$bllimit = null,
$blredirect = null
Expand Down Expand Up @@ -571,7 +571,7 @@ public function getBackLinks(
*
* @since 1.0
*/
public function getIWBackLinks($iwbltitle, $iwblprefix = null, $iwblcontinue = null, $iwbllimit = null, array $iwblprop = null)
public function getIWBackLinks($iwbltitle, $iwblprefix = null, $iwblcontinue = null, $iwbllimit = null, ?array $iwblprop = null)
{
// Build the request
$path = '?action=query&list=iwbacklinks';
Expand Down
8 changes: 4 additions & 4 deletions src/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ class Search extends AbstractMediawikiObject
*/
public function search(
$srsearch,
array $srnamespace = null,
?array $srnamespace = null,
$srwhat = null,
array $srinfo = null,
array $srprop = null,
?array $srinfo = null,
?array $srprop = null,
$srredirects = null,
$sroffest = null,
$srlimit = null
Expand Down Expand Up @@ -94,7 +94,7 @@ public function search(
*
* @since 1.0
*/
public function openSearch($search, $limit = null, array $namespace = null, $suggest = null, $format = null)
public function openSearch($search, $limit = null, ?array $namespace = null, $suggest = null, $format = null)
{
// Build the request.
$path = '?action=query&list=search';
Expand Down
20 changes: 10 additions & 10 deletions src/Sites.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ class Sites extends AbstractMediawikiObject
* @since 1.0
*/
public function getSiteInfo(
array $siprop = null,
?array $siprop = null,
$sifilteriw = null,
$sishowalldb = false,
$sinumberingroup = false,
array $siinlanguagecode = null
?array $siinlanguagecode = null
) {
// Build the request.
$path = '?action=query&meta=siteinfo';
Expand Down Expand Up @@ -85,7 +85,7 @@ public function getSiteInfo(
* @since 1.0
*/
public function getEvents(
array $leprop = null,
?array $leprop = null,
$letype = null,
$leaction = null,
$letitle = null,
Expand Down Expand Up @@ -175,13 +175,13 @@ public function getRecentChanges(
$rcstart = null,
$rcend = null,
$rcdir = null,
array $rcnamespace = null,
?array $rcnamespace = null,
$rcuser = null,
$rcexcludeuser = null,
$rctag = null,
array $rcprop = null,
array $rctoken = null,
array $rcshow = null,
?array $rcprop = null,
?array $rctoken = null,
?array $rcshow = null,
$rclimit = null,
$rctype = null,
$rctoponly = null
Expand Down Expand Up @@ -263,13 +263,13 @@ public function getRecentChanges(
* @since 1.0
*/
public function getProtectedTitles(
array $ptnamespace = null,
array $ptlevel = null,
?array $ptnamespace = null,
?array $ptlevel = null,
$ptlimit = null,
$ptdir = null,
$ptstart = null,
$ptend = null,
array $ptprop = null
?array $ptprop = null
) {
// Build the request.
$path = '?action=query&list=protectedtitles';
Expand Down
10 changes: 5 additions & 5 deletions src/Users.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function logout()
*
* @since 1.0
*/
public function getUserInfo(array $ususers, array $usprop = null)
public function getUserInfo(array $ususers, ?array $usprop = null)
{
// Build the request path.
$path = '?action=query&list=users';
Expand All @@ -124,7 +124,7 @@ public function getUserInfo(array $ususers, array $usprop = null)
*
* @since 1.0
*/
public function getCurrentUserInfo(array $uiprop = null)
public function getCurrentUserInfo(?array $uiprop = null)
{
// Build the request path.
$path = '?action=query&meta=userinfo';
Expand Down Expand Up @@ -167,9 +167,9 @@ public function getUserContribs(
$ucend = null,
$uccontinue = null,
$ucdir = null,
array $ucnamespace = null,
array $ucprop = null,
array $ucshow = null,
?array $ucnamespace = null,
?array $ucprop = null,
?array $ucshow = null,
$uctag = null,
$uctoponly = null
) {
Expand Down
Loading