docs: Make PHP file headers more consistent

* A fixed license header for the file.

* Move class descriptions, doc tags, author/copyright to the
  class block. Remove MW-core specific "ingroup" tags such as
  "SpecialPage" which has no meaning in an extension and are not
  used by Doxygen.
  Ref https://gerrit.wikimedia.org/r/q/message:ingroup

Change-Id: I13d9b0ff7a3150180196c9fa58f8a321b14edd22
This commit is contained in:
Timo Tijhof 2023-10-25 23:32:58 +01:00 committed by James D. Forrester
parent 1ebcbafc89
commit d12bf68c25
13 changed files with 89 additions and 66 deletions

View file

@ -1,18 +1,5 @@
<?php
namespace MediaWiki\Extension\Gadgets\Api;
use ApiBase;
use ApiQuery;
use ApiQueryBase;
use ApiResult;
use MediaWiki\Extension\Gadgets\GadgetRepo;
use Wikimedia\ParamValidator\ParamValidator;
/**
* Created on 16 April 2011
* API for Gadgets extension
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@ -27,8 +14,22 @@ use Wikimedia\ParamValidator\ParamValidator;
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
*/
namespace MediaWiki\Extension\Gadgets\Api;
use ApiBase;
use ApiQuery;
use ApiQueryBase;
use ApiResult;
use MediaWiki\Extension\Gadgets\GadgetRepo;
use Wikimedia\ParamValidator\ParamValidator;
/**
* API for Gadgets extension
*/
class ApiQueryGadgetCategories extends ApiQueryBase {
/**
* @var array

View file

@ -1,19 +1,5 @@
<?php
namespace MediaWiki\Extension\Gadgets\Api;
use ApiBase;
use ApiQuery;
use ApiQueryBase;
use ApiResult;
use MediaWiki\Extension\Gadgets\Gadget;
use MediaWiki\Extension\Gadgets\GadgetRepo;
use Wikimedia\ParamValidator\ParamValidator;
/**
* Created on 15 April 2011
* API for Gadgets extension
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@ -28,8 +14,20 @@ use Wikimedia\ParamValidator\ParamValidator;
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
*/
namespace MediaWiki\Extension\Gadgets\Api;
use ApiBase;
use ApiQuery;
use ApiQueryBase;
use ApiResult;
use MediaWiki\Extension\Gadgets\Gadget;
use MediaWiki\Extension\Gadgets\GadgetRepo;
use Wikimedia\ParamValidator\ParamValidator;
class ApiQueryGadgets extends ApiQueryBase {
/**
* @var array

View file

@ -1,7 +1,5 @@
<?php
/**
* Copyright 2014
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or

View file

@ -1,7 +1,5 @@
<?php
/**
* Copyright 2016
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or

View file

@ -1,8 +1,5 @@
<?php
/**
* Copyright 2014
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or

View file

@ -1,7 +1,5 @@
<?php
/**
* Copyright 2014
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or

View file

@ -1,8 +1,5 @@
<?php
/**
* Copyright 2014
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or

View file

@ -1,14 +1,21 @@
<?php
/**
* Gadgets extension - lets users select custom javascript gadgets
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* For more info see https://www.mediawiki.org/wiki/Extension:Gadgets
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
* @ingroup Extensions
* @author Daniel Kinzler, brightbyte.de
* @copyright © 2007 Daniel Kinzler
* @license GPL-2.0-or-later
*/
namespace MediaWiki\Extension\Gadgets;
@ -21,7 +28,9 @@ use ResourceLoader;
use Skin;
/**
* Wrapper for one gadget.
* Represents one gadget definition.
*
* @copyright 2007 Daniel Kinzler
*/
class Gadget {
/**

View file

@ -1,7 +1,4 @@
<?php
namespace MediaWiki\Extension\Gadgets;
/**
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -18,14 +15,18 @@ namespace MediaWiki\Extension\Gadgets;
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @author Siddharth VP
* @file
*/
namespace MediaWiki\Extension\Gadgets;
use OutputPage;
use Skin;
use User;
/**
* @author Siddharth VP
*/
class GadgetLoadConditions {
/** @var User */
private $user;

View file

@ -1,7 +1,4 @@
<?php
namespace MediaWiki\Extension\Gadgets;
/**
* Copyright © 2007 Daniel Kinzler
*
@ -23,6 +20,8 @@ namespace MediaWiki\Extension\Gadgets;
* @file
*/
namespace MediaWiki\Extension\Gadgets;
use Content;
use Exception;
use ExtensionRegistry;

View file

@ -1,4 +1,22 @@
<?php
/**
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
*/
namespace MediaWiki\Extension\Gadgets;

View file

@ -1,9 +1,5 @@
<?php
/**
* Implements Special:GadgetUsage
*
* Copyright © 2015 Niharika Kohli
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@ -20,8 +16,6 @@
* http://www.gnu.org/copyleft/gpl.html
*
* @file
* @ingroup SpecialPage
* @author Niharika Kohli <niharika@wikimedia.org>
*/
namespace MediaWiki\Extension\Gadgets\Special;
@ -36,8 +30,9 @@ use Wikimedia\Rdbms\IDatabase;
use Wikimedia\Rdbms\IResultWrapper;
/**
* Special:GadgetUsage - Lists all the gadgets on the wiki along with number of users.
* @ingroup SpecialPage
* Special:GadgetUsage lists all the gadgets on the wiki along with number of users.
*
* @copyright 2015 Niharika Kohli
*/
class SpecialGadgetUsage extends QueryPage {
public function __construct( $name = 'GadgetUsage' ) {

View file

@ -1,12 +1,21 @@
<?php
/**
* Special:Gadgets, provides a preview of MediaWiki:Gadgets.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
* @ingroup SpecialPage
* @author Daniel Kinzler, brightbyte.de
* @copyright © 2007 Daniel Kinzler
* @license GPL-2.0-or-later
*/
namespace MediaWiki\Extension\Gadgets\Special;
@ -22,6 +31,11 @@ use Sanitizer;
use SpecialPage;
use Xml;
/**
* Special:Gadgets renders the data of MediaWiki:Gadgets-definition.
*
* @copyright 2007 Daniel Kinzler
*/
class SpecialGadgets extends SpecialPage {
public function __construct() {
parent::__construct( 'Gadgets' );