Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368092 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
......................................................................

build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I2bf16959dde2b51e8acabe2c9c7b9238c8a4bb4a
---
M TimedMediaHandler.hooks.php
M TimedMediaTransformOutput.php
M WebVideoTranscode/WebVideoTranscode.php
M composer.json
M phpcs.xml
5 files changed, 47 insertions(+), 48 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler 
refs/changes/92/368092/1

diff --git a/TimedMediaHandler.hooks.php b/TimedMediaHandler.hooks.php
index 3f2029a..eae75c6 100644
--- a/TimedMediaHandler.hooks.php
+++ b/TimedMediaHandler.hooks.php
@@ -398,7 +398,7 @@
         */
        public static function onImageOpenShowImageInlineBefore( &$imagePage, 
&$out ) {
                $file = $imagePage->getDisplayedFile();
-               return TimedMediaHandlerHooks::onImagePageHooks( $file, $out );
+               return self::onImagePageHooks( $file, $out );
        }
 
        /**
@@ -410,7 +410,7 @@
         */
        public static function onImagePageFileHistoryLine( $imagePage, $file, 
&$line, &$css ) {
                $out = $imagePage->getContext()->getOutput();
-               return TimedMediaHandlerHooks::onImagePageHooks( $file, $out );
+               return self::onImagePageHooks( $file, $out );
        }
 
        /**
diff --git a/TimedMediaTransformOutput.php b/TimedMediaTransformOutput.php
index c45c640..02d296a 100644
--- a/TimedMediaTransformOutput.php
+++ b/TimedMediaTransformOutput.php
@@ -187,8 +187,8 @@
        function getImagePopUp() {
                // pop up videos set the autoplay attribute to true:
                $autoPlay = true;
-               $id = TimedMediaTransformOutput::$serial;
-               TimedMediaTransformOutput::$serial++;
+               $id = self::$serial;
+               self::$serial++;
 
                return Xml::tags( 'div', [
                                'id' => self::PLAYER_ID_PREFIX . $id,
@@ -416,8 +416,8 @@
                        $height .= 'px';
                }
 
-               $id = TimedMediaTransformOutput::$serial;
-               TimedMediaTransformOutput::$serial++;
+               $id = self::$serial;
+               self::$serial++;
                $mediaAttr = [
                        'id' => self::PLAYER_ID_PREFIX . $id,
                        // Get the correct size:
diff --git a/WebVideoTranscode/WebVideoTranscode.php 
b/WebVideoTranscode/WebVideoTranscode.php
index 0b12403..253fdc2 100644
--- a/WebVideoTranscode/WebVideoTranscode.php
+++ b/WebVideoTranscode/WebVideoTranscode.php
@@ -81,7 +81,7 @@
        * http://firefogg.org/dev/index.html
        */
        public static $derivativeSettings = [
-               WebVideoTranscode::ENC_OGV_160P =>
+               self::ENC_OGV_160P =>
                        [
                                'maxSize'                    => '288x160',
                                'videoBitrate'               => '160',
@@ -96,7 +96,7 @@
                                'videoCodec'                 => 'theora',
                                'type'                       => 'video/ogg; 
codecs="theora, vorbis"',
                        ],
-               WebVideoTranscode::ENC_OGV_240P =>
+               self::ENC_OGV_240P =>
                        [
                                'maxSize'                    => '426x240',
                                'videoBitrate'               => '512',
@@ -111,7 +111,7 @@
                                'videoCodec'                 => 'theora',
                                'type'                       => 'video/ogg; 
codecs="theora, vorbis"',
                        ],
-               WebVideoTranscode::ENC_OGV_360P =>
+               self::ENC_OGV_360P =>
                        [
                                'maxSize'                    => '640x360',
                                'videoBitrate'               => '1024',
@@ -126,7 +126,7 @@
                                'videoCodec'                 => 'theora',
                                'type'                       => 'video/ogg; 
codecs="theora, vorbis"',
                        ],
-               WebVideoTranscode::ENC_OGV_480P =>
+               self::ENC_OGV_480P =>
                        [
                                'maxSize'                    => '854x480',
                                'videoBitrate'               => '2048',
@@ -142,7 +142,7 @@
                                'type'                       => 'video/ogg; 
codecs="theora, vorbis"',
                        ],
 
-               WebVideoTranscode::ENC_OGV_720P =>
+               self::ENC_OGV_720P =>
                        [
                                'maxSize'                    => '1280x720',
                                'videoQuality'               => 6,
@@ -156,7 +156,7 @@
                                'type'                       => 'video/ogg; 
codecs="theora, vorbis"',
                        ],
 
-               WebVideoTranscode::ENC_OGV_1080P =>
+               self::ENC_OGV_1080P =>
                        [
                                'maxSize'                    => '1920x1080',
                                'videoQuality'               => 6,
@@ -171,7 +171,7 @@
                        ],
 
                // WebM transcode:
-               WebVideoTranscode::ENC_WEBM_160P =>
+               self::ENC_WEBM_160P =>
                        [
                                'maxSize'                    => '288x160',
                                'videoBitrate'               => '128',
@@ -184,7 +184,7 @@
                                'slices'                     => '2',
                                'type'                       => 'video/webm; 
codecs="vp8, vorbis"',
                        ],
-               WebVideoTranscode::ENC_WEBM_240P =>
+               self::ENC_WEBM_240P =>
                        [
                                'maxSize'                    => '426x240',
                                'videoBitrate'               => '256',
@@ -197,7 +197,7 @@
                                'slices'                     => '2',
                                'type'                       => 'video/webm; 
codecs="vp8, vorbis"',
                        ],
-               WebVideoTranscode::ENC_WEBM_360P =>
+               self::ENC_WEBM_360P =>
                        [
                                'maxSize'                    => '640x360',
                                'videoBitrate'               => '512',
@@ -210,7 +210,7 @@
                                'slices'                     => '2',
                                'type'                       => 'video/webm; 
codecs="vp8, vorbis"',
                        ],
-               WebVideoTranscode::ENC_WEBM_480P =>
+               self::ENC_WEBM_480P =>
                        [
                                'maxSize'                    => '854x480',
                                'videoBitrate'               => '1024',
@@ -223,7 +223,7 @@
                                'slices'                     => '4',
                                'type'                       => 'video/webm; 
codecs="vp8, vorbis"',
                        ],
-               WebVideoTranscode::ENC_WEBM_720P =>
+               self::ENC_WEBM_720P =>
                        [
                                'maxSize'                    => '1280x720',
                                'videoBitrate'               => '2048',
@@ -233,7 +233,7 @@
                                'slices'                     => '4',
                                'type'                       => 'video/webm; 
codecs="vp8, vorbis"',
                        ],
-               WebVideoTranscode::ENC_WEBM_1080P =>
+               self::ENC_WEBM_1080P =>
                        [
                                'maxSize'                    => '1920x1080',
                                'videoBitrate'               => '4096',
@@ -243,7 +243,7 @@
                                'slices'                     => '4',
                                'type'                       => 'video/webm; 
codecs="vp8, vorbis"',
                        ],
-               WebVideoTranscode::ENC_WEBM_1440P =>
+               self::ENC_WEBM_1440P =>
                        [
                                'maxSize'                    => '2560x1440',
                                'videoBitrate'               => '8192',
@@ -253,7 +253,7 @@
                                'slices'                     => '8',
                                'type'                       => 'video/webm; 
codecs="vp8, vorbis"',
                        ],
-               WebVideoTranscode::ENC_WEBM_2160P =>
+               self::ENC_WEBM_2160P =>
                        [
                                'maxSize'                    => '4096x2160',
                                'videoBitrate'               => '16384',
@@ -265,7 +265,7 @@
                        ],
 
                // WebM VP9 transcode:
-               WebVideoTranscode::ENC_VP9_160P =>
+               self::ENC_VP9_160P =>
                        [
                                'maxSize'                    => '288x160',
                                'videoBitrate'               => '80',
@@ -278,7 +278,7 @@
                                'audioCodec'                 => 'opus',
                                'type'                       => 'video/webm; 
codecs="vp9, opus"',
                        ],
-               WebVideoTranscode::ENC_VP9_240P =>
+               self::ENC_VP9_240P =>
                        [
                                'maxSize'                    => '426x240',
                                'videoBitrate'               => '128',
@@ -291,7 +291,7 @@
                                'audioCodec'                 => 'opus',
                                'type'                       => 'video/webm; 
codecs="vp9, opus"',
                        ],
-               WebVideoTranscode::ENC_VP9_360P =>
+               self::ENC_VP9_360P =>
                        [
                                'maxSize'                    => '640x360',
                                'videoBitrate'               => '256',
@@ -305,7 +305,7 @@
                                'tileColumns'                => '1',
                                'type'                       => 'video/webm; 
codecs="vp9, opus"',
                        ],
-               WebVideoTranscode::ENC_VP9_480P =>
+               self::ENC_VP9_480P =>
                        [
                                'maxSize'                    => '854x480',
                                'videoBitrate'               => '512',
@@ -319,7 +319,7 @@
                                'tileColumns'                => '1',
                                'type'                       => 'video/webm; 
codecs="vp9, opus"',
                        ],
-               WebVideoTranscode::ENC_VP9_720P =>
+               self::ENC_VP9_720P =>
                        [
                                'maxSize'                    => '1280x720',
                                'videoBitrate'               => '1024',
@@ -333,7 +333,7 @@
                                'tileColumns'                => '2',
                                'type'                       => 'video/webm; 
codecs="vp9, opus"',
                        ],
-               WebVideoTranscode::ENC_VP9_1080P =>
+               self::ENC_VP9_1080P =>
                        [
                                'maxSize'                    => '1920x1080',
                                'videoBitrate'               => '2048',
@@ -347,7 +347,7 @@
                                'tileColumns'                => '4',
                                'type'                       => 'video/webm; 
codecs="vp9, opus"',
                        ],
-               WebVideoTranscode::ENC_VP9_1440P =>
+               self::ENC_VP9_1440P =>
                        [
                                'maxSize'                    => '2560x1440',
                                'videoBitrate'               => '4096',
@@ -361,7 +361,7 @@
                                'tileColumns'                => '4',
                                'type'                       => 'video/webm; 
codecs="vp9, opus"',
                        ],
-               WebVideoTranscode::ENC_VP9_2160P =>
+               self::ENC_VP9_2160P =>
                        [
                                'maxSize'                    => '4096x2160',
                                'videoBitrate'               => '8192',
@@ -383,7 +383,7 @@
                // 
https://developer.apple.com/library/ios/#documentation/networkinginternet/conceptual/streamingmediaguide/UsingHTTPLiveStreaming/UsingHTTPLiveStreaming.html#//apple_ref/doc/uid/TP40008332-CH102-DontLinkElementID_24
                // @codingStandardsIgnoreEnd
 
-               WebVideoTranscode::ENC_H264_160P =>
+               self::ENC_H264_160P =>
                        [
                                'maxSize' => '288x160',
                                'videoCodec' => 'h264',
@@ -394,7 +394,7 @@
                                'type' => 'video/mp4; codecs="avc1.42E01E, 
mp4a.40.2"',
                        ],
 
-               WebVideoTranscode::ENC_H264_240P =>
+               self::ENC_H264_240P =>
                        [
                                'maxSize' => '426x240',
                                'videoCodec' => 'h264',
@@ -405,7 +405,7 @@
                                'type' => 'video/mp4; codecs="avc1.42E01E, 
mp4a.40.2"',
                        ],
 
-               WebVideoTranscode::ENC_H264_320P =>
+               self::ENC_H264_320P =>
                        [
                                'maxSize' => '480x320',
                                'videoCodec' => 'h264',
@@ -416,7 +416,7 @@
                                'type' => 'video/mp4; codecs="avc1.42E01E, 
mp4a.40.2"',
                        ],
 
-               WebVideoTranscode::ENC_H264_360P =>
+               self::ENC_H264_360P =>
                        [
                                'maxSize' => '640x360',
                                'videoCodec' => 'h264',
@@ -427,7 +427,7 @@
                                'type' => 'video/mp4; codecs="avc1.42E01E, 
mp4a.40.2"',
                        ],
 
-               WebVideoTranscode::ENC_H264_480P =>
+               self::ENC_H264_480P =>
                        [
                                'maxSize' => '854x480',
                                'videoCodec' => 'h264',
@@ -437,7 +437,7 @@
                                'audioBitrate' => '64k',
                                'type' => 'video/mp4; codecs="avc1.42E01E, 
mp4a.40.2"',
                        ],
-               WebVideoTranscode::ENC_H264_720P =>
+               self::ENC_H264_720P =>
                        [
                                'maxSize' => '1280x720',
                                'videoCodec' => 'h264',
@@ -447,7 +447,7 @@
                                'audioBitrate' => '128k',
                                'type' => 'video/mp4; codecs="avc1.42E01E, 
mp4a.40.2"',
                        ],
-               WebVideoTranscode::ENC_H264_1080P =>
+               self::ENC_H264_1080P =>
                        [
                                'maxSize' => '1920x1080',
                                'videoCodec' => 'h264',
@@ -457,7 +457,7 @@
                                'audioBitrate' => '128k',
                                'type' => 'video/mp4; codecs="avc1.42E01E, 
mp4a.40.2"',
                        ],
-               WebVideoTranscode::ENC_H264_1440P =>
+               self::ENC_H264_1440P =>
                        [
                                'maxSize' => '2560x1440',
                                'videoCodec' => 'h264',
@@ -467,7 +467,7 @@
                                'audioBitrate' => '128k',
                                'type' => 'video/mp4; codecs="avc1.42E01E, 
mp4a.40.2"',
                        ],
-               WebVideoTranscode::ENC_H264_2160P =>
+               self::ENC_H264_2160P =>
                        [
                                'maxSize' => '4096x2160',
                                'videoCodec' => 'h264',
@@ -479,7 +479,7 @@
                        ],
 
                // Audio profiles
-               WebVideoTranscode::ENC_OGG_VORBIS =>
+               self::ENC_OGG_VORBIS =>
                        [
                                'audioCodec'                 => 'vorbis',
                                'audioQuality'               => '3',
@@ -489,7 +489,7 @@
                                'novideo'                    => 'true',
                                'type'                       => 'audio/ogg; 
codecs="vorbis"',
                        ],
-               WebVideoTranscode::ENC_OGG_OPUS =>
+               self::ENC_OGG_OPUS =>
                        [
                                'audioCodec'                 => 'opus',
                                'audioQuality'               => '1',
@@ -499,7 +499,7 @@
                                'novideo'                    => 'true',
                                'type'                       => 'audio/ogg; 
codecs="opus"',
                        ],
-               WebVideoTranscode::ENC_MP3 =>
+               self::ENC_MP3 =>
                        [
                                'audioCodec'                 => 'mp3',
                                'audioQuality'               => '1',
@@ -509,7 +509,7 @@
                                'novideo'                    => 'true',
                                'type'                       => 'audio/mpeg',
                        ],
-               WebVideoTranscode::ENC_AAC =>
+               self::ENC_AAC =>
                        [
                                'audioCodec'                 => 'aac',
                                'audioQuality'               => '1',
@@ -1007,7 +1007,7 @@
                if ( $file->getHandler()->isAudio( $file ) ) {
                        $width = $height = 0;
                } else {
-                       list( $width, $height ) = 
WebVideoTranscode::getMaxSizeTransform(
+                       list( $width, $height ) = self::getMaxSizeTransform(
                                $file,
                                
self::$derivativeSettings[$transcodeKey]['maxSize']
                        );
@@ -1233,7 +1233,7 @@
         * @return int
         */
        public static function getQueueSize( File $file, $transcodeKey ) {
-               if ( WebVideoTranscode::isTranscodePrioritized( $file, 
$transcodeKey ) ) {
+               if ( self::isTranscodePrioritized( $file, $transcodeKey ) ) {
                        $queue = 'webVideoTranscodePrioritized';
                } else {
                        $queue = 'webVideoTranscode';
diff --git a/composer.json b/composer.json
index ed51e40..7522714 100644
--- a/composer.json
+++ b/composer.json
@@ -4,7 +4,7 @@
        },
        "require-dev": {
                "jakub-onderka/php-parallel-lint": "0.9.2",
-               "mediawiki/mediawiki-codesniffer": "0.10.0",
+               "mediawiki/mediawiki-codesniffer": "0.10.1",
                "jakub-onderka/php-console-highlighter": "0.3.2"
        },
        "scripts": {
diff --git a/phpcs.xml b/phpcs.xml
index 071185c..9ff48ff 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -10,8 +10,7 @@
        <file>.</file>
        <arg name="extensions" value="php,php5,inc"/>
        <arg name="encoding" value="UTF-8"/>
-       <exclude-pattern>libs</exclude-pattern>
-       <exclude-pattern>MwEmbedModules</exclude-pattern>
-       <exclude-pattern>handlers/OggHandler/File_Ogg</exclude-pattern>
-       <exclude-pattern>vendor</exclude-pattern>
+       <exclude-pattern type="relative">^libs</exclude-pattern>
+       <exclude-pattern type="relative">^MwEmbedModules</exclude-pattern>
+       <exclude-pattern 
type="relative">^handlers/OggHandler/File_Ogg</exclude-pattern>
 </ruleset>

-- 
To view, visit https://gerrit.wikimedia.org/r/368092
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2bf16959dde2b51e8acabe2c9c7b9238c8a4bb4a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to