Merge "Revert "mediawiki.widgets: Add temporary workaround for upstream oojs-ui bug""
[lhc/web/wiklou.git] / includes / media / XMP.php
index e424b9b..6d19700 100644 (file)
@@ -329,7 +329,7 @@ class XMPReader implements LoggerAwareInterface {
                                                        $this->charset = 'UTF-8';
                                                        break;
                                                default:
-                                                       //this should be impossible to get to
+                                                       // this should be impossible to get to
                                                        throw new RuntimeException( "Invalid BOM" );
                                        }
                                } else {
@@ -338,7 +338,7 @@ class XMPReader implements LoggerAwareInterface {
                                }
                        }
                        if ( $this->charset !== 'UTF-8' ) {
-                               //don't convert if already utf-8
+                               // don't convert if already utf-8
                                MediaWiki\suppressWarnings();
                                $content = iconv( $this->charset, 'UTF-8//IGNORE', $content );
                                MediaWiki\restoreWarnings();
@@ -447,9 +447,8 @@ class XMPReader implements LoggerAwareInterface {
                // immediately following the StandardXMP. However, the JPEG standard
                // does not require preservation of marker segment order. A robust JPEG
                // reader should tolerate the marker segments in any order."
-               //
-               // otoh the probability that an image will have more than 128k of
-               // metadata is rather low... so the probability that it will have
+               // On the other hand, the probability that an image will have more than
+               // 128k of metadata is rather low... so the probability that it will have
                // > 128k, and be in the wrong order is very low...
 
                if ( $len['offset'] !== $this->extendedXMPOffset ) {
@@ -1213,8 +1212,7 @@ class XMPReader implements LoggerAwareInterface {
                        // In practise I have yet to see a file that
                        // uses this element, however it is mentioned
                        // on page 25 of part 1 of the xmp standard.
-                       //
-                       // also it seems as if exiv2 and exiftool do not support
+                       // Also it seems as if exiv2 and exiftool do not support
                        // this either (That or I misunderstand the standard)
                        $this->logger->info( __METHOD__ . ' Encountered <rdf:type> which isn\'t currently supported' );
                }
@@ -1271,6 +1269,7 @@ class XMPReader implements LoggerAwareInterface {
                }
        }
 
+       // @codingStandardsIgnoreStart Generic.Files.LineLength
        /**
         * Process attributes.
         * Simple values can be stored as either a tag or attribute
@@ -1278,16 +1277,15 @@ class XMPReader implements LoggerAwareInterface {
         * Often the initial "<rdf:Description>" tag just has all the simple
         * properties as attributes.
         *
-        * @codingStandardsIgnoreStart Long line that cannot be broken
         * @par Example:
         * @code
         * <rdf:Description rdf:about="" xmlns:exif="http://ns.adobe.com/exif/1.0/" exif:DigitalZoomRatio="0/10">
         * @endcode
-        * @codingStandardsIgnoreEnd
         *
         * @param array $attribs Array attribute=>value
         * @throws RuntimeException
         */
+       // @codingStandardsIgnoreEnd
        private function doAttribs( $attribs ) {
                // first check for rdf:parseType attribute, as that can change
                // how the attributes are interperted.