Merge "Http::getProxy() method to get proxy configuration"
[lhc/web/wiklou.git] / includes / parser / ParserOptions.php
index 49c6ce9..729b9db 100644 (file)
@@ -120,13 +120,13 @@ class ParserOptions {
         * Callback for current revision fetching. Used as first argument to call_user_func().
         */
        private $mCurrentRevisionCallback =
-               array( 'Parser', 'statelessFetchRevision' );
+               [ 'Parser', 'statelessFetchRevision' ];
 
        /**
         * Callback for template fetching. Used as first argument to call_user_func().
         */
        private $mTemplateCallback =
-               array( 'Parser', 'statelessFetchTemplate' );
+               [ 'Parser', 'statelessFetchTemplate' ];
 
        /**
         * Enable limit report in an HTML comment on output
@@ -690,10 +690,10 @@ class ParserOptions {
         */
        public function matches( ParserOptions $other ) {
                $fields = array_keys( get_class_vars( __CLASS__ ) );
-               $fields = array_diff( $fields, array(
+               $fields = array_diff( $fields, [
                        'mEnableLimitReport', // only effects HTML comments
                        'onAccessCallback', // only used for ParserOutput option tracking
-               ) );
+               ] );
                foreach ( $fields as $field ) {
                        if ( !is_object( $this->$field ) && $this->$field !== $other->$field ) {
                                return false;
@@ -736,14 +736,14 @@ class ParserOptions {
         * @return array
         */
        public static function legacyOptions() {
-               return array(
+               return [
                        'stubthreshold',
                        'numberheadings',
                        'userlang',
                        'thumbsize',
                        'editsection',
                        'printable'
-               );
+               ];
        }
 
        /**
@@ -832,7 +832,7 @@ class ParserOptions {
 
                // Give a chance for extensions to modify the hash, if they have
                // extra options or other effects on the parser cache.
-               Hooks::run( 'PageRenderingHash', array( &$confstr, $this->getUser(), &$forOptions ) );
+               Hooks::run( 'PageRenderingHash', [ &$confstr, $this->getUser(), &$forOptions ] );
 
                // Make it a valid memcached key fragment
                $confstr = str_replace( ' ', '_', $confstr );
@@ -856,14 +856,14 @@ class ParserOptions {
                                $titleToCheck, $parser = false ) use ( $title, $content, $user, &$oldCallback
                        ) {
                                if ( $titleToCheck->equals( $title ) ) {
-                                       return new Revision( array(
+                                       return new Revision( [
                                                'page' => $title->getArticleID(),
                                                'user_text' => $user->getName(),
                                                'user' => $user->getId(),
-                                               'parent_id' => $title->getLatestRevId(),
+                                               'parent_id' => $title->getLatestRevID(),
                                                'title' => $title,
                                                'content' => $content
-                                       ) );
+                                       ] );
                                } else {
                                        return call_user_func( $oldCallback, $titleToCheck, $parser );
                                }