Problem/Motivation
The ViewExecutable class still has a lot of public properties, let's remove some of them, which aren't actually needed:
/**
* The current page. If the view uses pagination.
*
* @var int
*/
public $current_page = NULL;
/**
* The number of items per page.
*
* @var int
*/
public $items_per_page = NULL;
/**
* The pager offset.
*
* @var int
*/
public $offset = NULL;
public function setCurrentPage($page) {}
public function getCurrentPage($page) {}
public function getItemsPerPage($page) {}
public function setItemsPerPage($page) {}
public function getOffset($page) {}
public function setOffset($page) {}
Proposed resolution
Replace public with protected and search for all usages of those and replace it with the appropriate method call.