Fix the last Generic.Files.LineLength phpcs failures
authorAmir E. Aharoni <amir.aharoni@mail.huji.ac.il>
Sat, 3 Oct 2015 18:02:55 +0000 (21:02 +0300)
committerReedy <reedy@wikimedia.org>
Sat, 3 Oct 2015 18:08:49 +0000 (18:08 +0000)
In both cases the long lines are inside method documentation,
and because @codingStandardsIgnoreStart comments only
work with // and not /*, they have to be outside the method comment.

Bug: T102614
Bug: T114213
Change-Id: I7343e1cf662c5bf12a5e4385646c5c2c4a798260

includes/media/XMP.php
tests/phpunit/includes/SampleTest.php

index fb840c2..6d19700 100644 (file)
@@ -1269,6 +1269,7 @@ class XMPReader implements LoggerAwareInterface {
                }
        }
 
+       // @codingStandardsIgnoreStart Generic.Files.LineLength
        /**
         * Process attributes.
         * Simple values can be stored as either a tag or attribute
@@ -1276,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.
index c5944d1..4b06e83 100644 (file)
@@ -57,12 +57,12 @@ class TestSample extends MediaWikiLangTestCase {
                );
        }
 
+       // @codingStandardsIgnoreStart Generic.Files.LineLength
        /**
         * @dataProvider provideTitles
-        * @codingStandardsIgnoreStart Ignore long line warning
         * See http://phpunit.de/manual/3.7/en/appendixes.annotations.html#appendixes.annotations.dataProvider
-        * @codingStandardsIgnoreEnd
         */
+       // @codingStandardsIgnoreEnd
        public function testCreateBasicListOfTitles( $titleName, $ns, $text ) {
                $title = Title::newFromText( $titleName, $ns );
                $this->assertEquals( $text, "$title", "see if '$titleName' matches '$text'" );
@@ -95,7 +95,7 @@ class TestSample extends MediaWikiLangTestCase {
                $this->assertTrue( $title->isLocal() );
        }
 
-       // @codingStandardsIgnoreStart Ignore long line warning
+       // @codingStandardsIgnoreStart Generic.Files.LineLength
        /**
         * @expectedException InvalidArgumentException
         * See http://phpunit.de/manual/3.7/en/appendixes.annotations.html#appendixes.annotations.expectedException