jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/364108 )

Change subject: Break long lines
......................................................................


Break long lines

Change-Id: Id6ee38af6372f807a496c7fa5d33b4f22436eaf4
---
M includes/TwoColConflictPage.php
M phpcs.xml
M tests/phpunit/includes/LineBasedUnifiedDiffFormatterTest.php
3 files changed, 30 insertions(+), 20 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/TwoColConflictPage.php b/includes/TwoColConflictPage.php
index 29eec16..13fed0a 100644
--- a/includes/TwoColConflictPage.php
+++ b/includes/TwoColConflictPage.php
@@ -55,7 +55,8 @@
                        $this->addCSS();
                        $this->addJS();
                        $this->deactivateWikEd();
-                       $this->editFormTextTop = '<div 
class="mw-twocolconflict-form mw-twocolconflict-before-base-selection">';
+                       $this->editFormTextTop =
+                               '<div class="mw-twocolconflict-form 
mw-twocolconflict-before-base-selection">';
                        $this->editFormTextBottom = '</div>';
                        $this->editFormTextBeforeContent = 
$this->addEditFormBeforeContent();
                        $this->editFormTextAfterContent = 
$this->addEditFormAfterContent();
@@ -122,10 +123,11 @@
                $out .= '<ul>';
                $out .= '';
                $out .= '<li><span class="mw-twocolconflict-lastuser">' .
-                       $this->getContext()->msg( 
'twoColConflict-changes-col-desc-2' )->text() . '</span><br/>' .
-                       $this->buildEditSummary() . '</li>';
+                       $this->getContext()->msg( 
'twoColConflict-changes-col-desc-2' )->text() .
+                       '</span><br/>' . $this->buildEditSummary() . '</li>';
                $out .= '<li><span class="mw-twocolconflict-user">' .
-                       $this->getContext()->msg( 
'twoColConflict-changes-col-desc-4' )->text() . '</span></li>';
+                       $this->getContext()->msg( 
'twoColConflict-changes-col-desc-4' )->text() .
+                       '</span></li>';
                $out .= '</ul>';
                $out .= '</div>';
                $out .= '</div>';
@@ -298,14 +300,20 @@
                $out .= '<div class="mw-twocolconflict-col-desc">';
                $out .= '<div class="mw-twocolconflict-edit-desc">';
                $out .= '<p>' . $this->getContext()->msg( 
'twoColConflict-editor-col-desc-1' ) . '</p>';
-               $out .= '<p>'
-                       . $this->getContext()->msg( 
'twoColConflict-editor-col-desc-2', $this->getSubmitButtonLabel() ) . '</p>';
+               $out .= '<p>' .
+                       $this->getContext()->msg(
+                               'twoColConflict-editor-col-desc-2', 
$this->getSubmitButtonLabel()
+                       ) . '</p>';
                $out .= '</div>';
                $out .= '<ol class="mw-twocolconflict-base-selection-desc">';
-               $out .= '<li>' . $this->getContext()->msg( 
'twoColConflict-base-selection-desc-1' ) . '</li>';
-               $out .= '<li>' . $this->getContext()->msg( 
'twoColConflict-base-selection-desc-2' ) . '</li>';
+               $out .= '<li>' . $this->getContext()->msg( 
'twoColConflict-base-selection-desc-1' ) .
+                       '</li>';
+               $out .= '<li>' . $this->getContext()->msg( 
'twoColConflict-base-selection-desc-2' ) .
+                       '</li>';
                $out .= '<li>'
-                       . $this->getContext()->msg( 
'twoColConflict-base-selection-desc-3', $this->getSubmitButtonLabel() ) . 
'</li>';
+                       . $this->getContext()->msg(
+                               'twoColConflict-base-selection-desc-3', 
$this->getSubmitButtonLabel()
+                       ) . '</li>';
                $out .= '</ol></div></div>';
 
                return $out;
@@ -527,7 +535,9 @@
                        '</span>' .
                        ( count( $lines ) > 1 ? "\n" : 
$this->getContext()->msg( 'word-separator' ) ) .
                        '<span 
class="mw-twocolconflict-diffchange-fadeout-start">' .
-                       htmlspecialchars( $this->trimStringToFullWord( 
array_pop( $lines ), $maxLength / 2, false ) ) .
+                       htmlspecialchars(
+                               $this->trimStringToFullWord( array_pop( $lines 
), $maxLength / 2, false )
+                       ) .
                        '</span>';
        }
 
@@ -599,11 +609,12 @@
        }
 
        private function addJS() {
-               $this->context->getOutput()->addJsConfigVars( 
'wgTwoColConflict', 'true' );
-               $this->context->getOutput()->addJsConfigVars( 
'wgTwoColConflictWikiEditor', $this->wikiEditorIsEnabled() );
-               $this->context->getOutput()->addJsConfigVars( 
'wgTwoColConflictSubmitLabel', $this->getSubmitButtonLabel() );
+               $out = $this->context->getOutput();
+               $out->addJsConfigVars( 'wgTwoColConflict', 'true' );
+               $out->addJsConfigVars( 'wgTwoColConflictWikiEditor', 
$this->wikiEditorIsEnabled() );
+               $out->addJsConfigVars( 'wgTwoColConflictSubmitLabel', 
$this->getSubmitButtonLabel() );
 
-               $this->context->getOutput()->addModules( [
+               $out->addModules( [
                        'ext.TwoColConflict.initJs',
                        'ext.TwoColConflict.filterOptionsJs'
                ] );
diff --git a/phpcs.xml b/phpcs.xml
index 4bbcb8c..4972d19 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -6,11 +6,6 @@
        </rule>
        <file>.</file>
        <arg name="extensions" value="php,php5,inc" />
-       <arg name="encoding" value="utf8" />
+       <arg name="encoding" value="UTF-8" />
        <exclude-pattern>vendor</exclude-pattern>
-       <rule ref="Generic.Files.LineLength">
-               <properties>
-                       <property name="lineLimit" value="115" />
-               </properties>
-       </rule>
 </ruleset>
diff --git a/tests/phpunit/includes/LineBasedUnifiedDiffFormatterTest.php 
b/tests/phpunit/includes/LineBasedUnifiedDiffFormatterTest.php
index bfaad62..a0ffe22 100644
--- a/tests/phpunit/includes/LineBasedUnifiedDiffFormatterTest.php
+++ b/tests/phpunit/includes/LineBasedUnifiedDiffFormatterTest.php
@@ -281,23 +281,27 @@
                                                                [
                                                                        
'action' => 'delete',
                                                                        'old' =>
+// @codingStandardsIgnoreStart
 <<<TEXT
 Line number two. <del class="diffchange">This </del>line <del 
class="diffchange">is </del>quite long!
 <del class="diffchange">And that's line number three - even longer than the 
line before.</del>
 &#160;
 <del class="diffchange">Just another line with an empty line above</del>.
 TEXT
+// @codingStandardsIgnoreEnd
                                                                        ,
                                                                        
'oldline' => 2
                                                                ],
                                                                [
                                                                        
'action' => 'add',
                                                                        'new' =>
+// @codingStandardsIgnoreStart
 <<<TEXT
 <ins class="diffchange">Add something new.</ins>
 Line number two. <ins class="diffchange">Now </ins>line <ins 
class="diffchange">number three and </ins>quite long!
 <ins class="diffchange">Add more new stuff</ins>.
 TEXT
+// @codingStandardsIgnoreEnd
                                                                        ,
                                                                        
'newline' => 2
                                                                ]

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id6ee38af6372f807a496c7fa5d33b4f22436eaf4
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/TwoColConflict
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>
Gerrit-Reviewer: Legoktm <lego...@member.fsf.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to