From 4490b5b5ec4b82e33e4347c1b14fa8ecc769ab7e Mon Sep 17 00:00:00 2001 From: "Amir E. Aharoni" Date: Sat, 3 Oct 2015 21:02:55 +0300 Subject: [PATCH] Fix the last Generic.Files.LineLength phpcs failures 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 | 4 ++-- tests/phpunit/includes/SampleTest.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/media/XMP.php b/includes/media/XMP.php index fb840c245d..6d1970078c 100644 --- a/includes/media/XMP.php +++ b/includes/media/XMP.php @@ -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 "" tag just has all the simple * properties as attributes. * - * @codingStandardsIgnoreStart Long line that cannot be broken * @par Example: * @code * * @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. diff --git a/tests/phpunit/includes/SampleTest.php b/tests/phpunit/includes/SampleTest.php index c5944d16f4..4b06e83917 100644 --- a/tests/phpunit/includes/SampleTest.php +++ b/tests/phpunit/includes/SampleTest.php @@ -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 -- 2.20.1