From: Umherirrender Date: Fri, 8 Mar 2019 22:29:14 +0000 (+0100) Subject: Move class RangeDifference to own file X-Git-Tag: 1.34.0-rc.0~2572^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22auteur_infos%22%2C%20%22id_auteur=%24id%22%29%20.%20%22?a=commitdiff_plain;h=9d5e2fd751412a2cef3a8774a8e8ce76ad7bd201;p=lhc%2Fweb%2Fwiklou.git Move class RangeDifference to own file Change-Id: I5262c7484017a0d920cc24297515d5946f614ee6 --- diff --git a/.phpcs.xml b/.phpcs.xml index 171cfaf63e..b8a80961db 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -214,7 +214,6 @@ */includes/api/ApiRsd\.php */includes/compat/XMPReader\.php */includes/diff/DairikiDiff\.php - */includes/diff/DiffEngine\.php */includes/Feed\.php */includes/filerepo/file/LocalFile\.php */includes/gallery/PackedOverlayImageGallery\.php diff --git a/autoload.php b/autoload.php index 403b61026d..e33a437817 100644 --- a/autoload.php +++ b/autoload.php @@ -1186,7 +1186,7 @@ $wgAutoloadLocalClasses = [ 'RSSFeed' => __DIR__ . '/includes/Feed.php', 'RandomPage' => __DIR__ . '/includes/specials/SpecialRandompage.php', 'RangeChronologicalPager' => __DIR__ . '/includes/pager/RangeChronologicalPager.php', - 'RangeDifference' => __DIR__ . '/includes/diff/DiffEngine.php', + 'RangeDifference' => __DIR__ . '/includes/diff/RangeDifference.php', 'RawAction' => __DIR__ . '/includes/actions/RawAction.php', 'RawMessage' => __DIR__ . '/includes/RawMessage.php', 'ReadOnlyError' => __DIR__ . '/includes/exception/ReadOnlyError.php', diff --git a/includes/diff/DiffEngine.php b/includes/diff/DiffEngine.php index 142c51d7a0..edf844417e 100644 --- a/includes/diff/DiffEngine.php +++ b/includes/diff/DiffEngine.php @@ -805,40 +805,3 @@ class DiffEngine { } } - -/** - * Alternative representation of a set of changes, by the index - * ranges that are changed. - * - * @ingroup DifferenceEngine - */ -class RangeDifference { - - /** @var int */ - public $leftstart; - - /** @var int */ - public $leftend; - - /** @var int */ - public $leftlength; - - /** @var int */ - public $rightstart; - - /** @var int */ - public $rightend; - - /** @var int */ - public $rightlength; - - function __construct( $leftstart, $leftend, $rightstart, $rightend ) { - $this->leftstart = $leftstart; - $this->leftend = $leftend; - $this->leftlength = $leftend - $leftstart; - $this->rightstart = $rightstart; - $this->rightend = $rightend; - $this->rightlength = $rightend - $rightstart; - } - -} diff --git a/includes/diff/RangeDifference.php b/includes/diff/RangeDifference.php new file mode 100644 index 0000000000..e625514f6e --- /dev/null +++ b/includes/diff/RangeDifference.php @@ -0,0 +1,61 @@ + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * + * @file + * @ingroup DifferenceEngine + */ + +/** + * Alternative representation of a set of changes, by the index + * ranges that are changed. + * + * @ingroup DifferenceEngine + */ +class RangeDifference { + + /** @var int */ + public $leftstart; + + /** @var int */ + public $leftend; + + /** @var int */ + public $leftlength; + + /** @var int */ + public $rightstart; + + /** @var int */ + public $rightend; + + /** @var int */ + public $rightlength; + + function __construct( $leftstart, $leftend, $rightstart, $rightend ) { + $this->leftstart = $leftstart; + $this->leftend = $leftend; + $this->leftlength = $leftend - $leftstart; + $this->rightstart = $rightstart; + $this->rightend = $rightend; + $this->rightlength = $rightend - $rightstart; + } + +}