Merge "SpecialWatchlist: Keep checkboxes and their labels together"
[lhc/web/wiklou.git] / includes / api / ApiMessage.php
index db826a6..5c3434f 100644 (file)
 
 /**
  * Interface for messages with machine-readable data for use by the API
+ *
+ * The idea is that it's a Message that has some extra data for the API to use when interpreting it
+ * as an error (or, in the future, as a warning). Internals of MediaWiki often use messages (or
+ * message keys, or Status objects containing messages) to pass information about errors to the user
+ * (see e.g. Title::getUserPermissionsErrors()) and the API has to make do with that.
+ *
  * @since 1.25
  * @ingroup API
  */
@@ -166,7 +172,6 @@ class ApiRawMessage extends RawMessage implements IApiMessage {
         *  - string: passed to RawMessage::__construct
         * @param string|null $code
         * @param array|null $data
-        * @return ApiMessage
         */
        public function __construct( $msg, $code = null, array $data = null ) {
                if ( $msg instanceof RawMessage ) {