Merge "jquery.badge: Align with Echo notifications style and WikimediaUI palette"
[lhc/web/wiklou.git] / api.php
diff --git a/api.php b/api.php
index 83c1373..a6ce3b2 100644 (file)
--- a/api.php
+++ b/api.php
@@ -63,12 +63,12 @@ RequestContext::getMain()->setTitle( $wgTitle );
 try {
        /* Construct an ApiMain with the arguments passed via the URL. What we get back
         * is some form of an ApiMain, possibly even one that produces an error message,
-        * but we don't care here, as that is handled by the ctor.
+        * but we don't care here, as that is handled by the constructor.
         */
        $processor = new ApiMain( RequestContext::getMain(), $wgEnableWriteAPI );
 
        // Last chance hook before executing the API
-       Hooks::run( 'ApiBeforeMain', array( &$processor ) );
+       Hooks::run( 'ApiBeforeMain', [ &$processor ] );
        if ( !$processor instanceof ApiMain ) {
                throw new MWException( 'ApiBeforeMain hook set $processor to a non-ApiMain class' );
        }
@@ -88,12 +88,12 @@ $endtime = microtime( true );
 
 // Log the request
 if ( $wgAPIRequestLog ) {
-       $items = array(
+       $items = [
                wfTimestamp( TS_MW ),
                $endtime - $starttime,
                $wgRequest->getIP(),
                $wgRequest->getHeader( 'User-agent' )
-       );
+       ];
        $items[] = $wgRequest->wasPosted() ? 'POST' : 'GET';
        if ( $processor ) {
                try {