From 4af04b1c43ea8b1198ba5027500552c88a09737c Mon Sep 17 00:00:00 2001
From: Luke Rodgers <lukerodgers90@gmail.com>
Date: Sun, 3 Dec 2017 17:57:34 +0000
Subject: [PATCH] Add ChangelogCounterInterface

---
 .../Framework/Mview/View/Changelog.php        |  4 ++--
 .../Mview/View/ChangelogCounterInterface.php  | 22 +++++++++++++++++++
 .../Mview/View/ChangelogInterface.php         |  9 --------
 3 files changed, 24 insertions(+), 11 deletions(-)
 create mode 100644 lib/internal/Magento/Framework/Mview/View/ChangelogCounterInterface.php

diff --git a/lib/internal/Magento/Framework/Mview/View/Changelog.php b/lib/internal/Magento/Framework/Mview/View/Changelog.php
index 4f648d6b7d6..6d75ee27be1 100644
--- a/lib/internal/Magento/Framework/Mview/View/Changelog.php
+++ b/lib/internal/Magento/Framework/Mview/View/Changelog.php
@@ -8,7 +8,7 @@ namespace Magento\Framework\Mview\View;
 use Magento\Framework\App\ResourceConnection;
 use Magento\Framework\Phrase;
 
-class Changelog implements ChangelogInterface
+class Changelog implements ChangelogInterface, ChangelogCounterInterface
 {
     /**
      * Suffix for changelog table
@@ -132,7 +132,7 @@ class Changelog implements ChangelogInterface
      * @return \Magento\Framework\DB\Select
      * @throws ChangelogTableNotExistsException
      */
-    protected function getListSelect($fromVersionId, $toVersionId)
+    private function getListSelect($fromVersionId, $toVersionId)
     {
         $changelogTableName = $this->resource->getTableName($this->getName());
         if (!$this->connection->isTableExists($changelogTableName)) {
diff --git a/lib/internal/Magento/Framework/Mview/View/ChangelogCounterInterface.php b/lib/internal/Magento/Framework/Mview/View/ChangelogCounterInterface.php
new file mode 100644
index 00000000000..5d92ad1c3de
--- /dev/null
+++ b/lib/internal/Magento/Framework/Mview/View/ChangelogCounterInterface.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Framework\Mview\View;
+
+/**
+ * Interface \Magento\Framework\Mview\View\ChangelogCounterInterface
+ *
+ */
+interface ChangelogCounterInterface
+{
+    /**
+     * Retrieve the count of entity ids in the range [$fromVersionId..$toVersionId]
+     *
+     * @param $fromVersionId
+     * @param $toVersionId
+     * @return mixed
+     */
+    public function getListSize($fromVersionId, $toVersionId);
+}
diff --git a/lib/internal/Magento/Framework/Mview/View/ChangelogInterface.php b/lib/internal/Magento/Framework/Mview/View/ChangelogInterface.php
index da115ecdb83..b00c1ca3a2e 100644
--- a/lib/internal/Magento/Framework/Mview/View/ChangelogInterface.php
+++ b/lib/internal/Magento/Framework/Mview/View/ChangelogInterface.php
@@ -42,15 +42,6 @@ interface ChangelogInterface
      */
     public function getList($fromVersionId, $toVersionId);
 
-    /**
-     * Retrieve the count of entity ids in the range [$fromVersionId..$toVersionId]
-     *
-     * @param $fromVersionId
-     * @param $toVersionId
-     * @return mixed
-     */
-    public function getListSize($fromVersionId, $toVersionId);
-
     /**
      * Get maximum version_id from changelog
      *
-- 
GitLab