Skip to content

Commit

Permalink
Remove most of protected members
Browse files Browse the repository at this point in the history
  • Loading branch information
JanPetr committed Jan 31, 2018
1 parent 3a9eba3 commit fb2dbeb
Show file tree
Hide file tree
Showing 17 changed files with 149 additions and 153 deletions.
16 changes: 8 additions & 8 deletions Adapter/Algolia.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
class Algolia implements AdapterInterface
{
/** @var Mapper */
protected $mapper;
private $mapper;

/** @var ResponseFactory */
protected $responseFactory;
private $responseFactory;

/** @var ResourceConnection */
private $resource;
Expand All @@ -38,22 +38,22 @@ class Algolia implements AdapterInterface
private $temporaryStorageFactory;

/** @var ConfigHelper */
protected $config;
private $config;

/** @var Data */
protected $catalogSearchHelper;
private $catalogSearchHelper;

/** @var StoreManagerInterface */
protected $storeManager;
private $storeManager;

/** @var AlgoliaHelper */
protected $algoliaHelper;
private $algoliaHelper;

/** @var Http */
protected $request;
private $request;

/** @var DocumentFactory */
protected $documentFactory;
private $documentFactory;

/**
* @param Mapper $mapper
Expand Down
30 changes: 15 additions & 15 deletions Block/Algolia.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@

class Algolia extends Template implements CollectionDataSourceInterface
{
protected $config;
protected $catalogSearchHelper;
protected $storeManager;
protected $objectManager;
protected $registry;
protected $productHelper;
protected $currency;
protected $algoliaHelper;
protected $urlHelper;
protected $formKey;
protected $httpContext;
protected $coreHelper;
protected $categoryHelper;

protected $priceKey;
private $config;
private $catalogSearchHelper;
private $storeManager;
private $objectManager;
private $registry;
private $productHelper;
private $currency;
private $algoliaHelper;
private $urlHelper;
private $formKey;
private $httpContext;
private $coreHelper;
private $categoryHelper;

private $priceKey;

public function __construct(
Template\Context $context,
Expand Down
6 changes: 3 additions & 3 deletions Block/Instant/Hit.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

class Hit extends Template
{
protected $config;
protected $priceKey;
protected $httpContext;
private $config;
private $priceKey;
private $httpContext;

public function __construct(
Template\Context $context,
Expand Down
2 changes: 1 addition & 1 deletion Block/Instant/Wrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class Wrapper extends Template
{
protected $config;
private $config;

public function __construct(
Template\Context $context,
Expand Down
4 changes: 2 additions & 2 deletions Block/TopSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

class TopSearch extends Template implements CollectionDataSourceInterface
{
protected $config;
protected $catalogSearchHelper;
private $config;
private $catalogSearchHelper;

public function __construct(
Template\Context $context,
Expand Down
2 changes: 1 addition & 1 deletion Controller/View/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class Index extends Action
{
/** @var \Magento\Framework\View\Result\PageFactory */
protected $resultPageFactory;
private $resultPageFactory;

public function __construct(
Context $context,
Expand Down
12 changes: 6 additions & 6 deletions Helper/AlgoliaHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@
class AlgoliaHelper extends AbstractHelper
{
/** @var Client */
protected $client;
private $client;

/** @var ConfigHelper */
protected $config;
private $config;

/** @var ManagerInterface */
protected $messageManager;
private $messageManager;

/** @var ConsoleOutput */
protected $consoleOutput;
private $consoleOutput;

/** @var int */
protected $maxRecordSize = 20000;
private $maxRecordSize = 20000;

/** @var array */
protected $potentiallyLongAttributes = ['description', 'short_description', 'meta_description', 'content'];
private $potentiallyLongAttributes = ['description', 'short_description', 'meta_description', 'content'];

/** @var string */
private static $lastUsedIndexName;
Expand Down
2 changes: 0 additions & 2 deletions Helper/ConfigHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ class ConfigHelper
const EXTRA_SETTINGS_ADDITIONAL_SECTIONS =
'algoliasearch_extra_settings/extra_settings/additional_sections_extra_settings';

protected $_productTypeMap = [];

private $configInterface;
private $objectManager;
private $currency;
Expand Down
32 changes: 16 additions & 16 deletions Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@ class Data
{
const COLLECTION_PAGE_SIZE = 100;

protected $algoliaHelper;

protected $pageHelper;
protected $categoryHelper;
protected $productHelper;
protected $suggestionHelper;
protected $additionalSectionHelper;
protected $stockRegistry;

protected $logger;
protected $configHelper;
protected $emulation;
protected $resource;
protected $eventManager;
protected $storeManager;
private $algoliaHelper;

private $pageHelper;
private $categoryHelper;
private $productHelper;
private $suggestionHelper;
private $additionalSectionHelper;
private $stockRegistry;

private $logger;
private $configHelper;
private $emulation;
private $resource;
private $eventManager;
private $storeManager;

private $emulationRuns = false;

Expand Down Expand Up @@ -448,7 +448,7 @@ public function rebuildStoreCategoryIndexPage($storeId, $collectionDefault, $pag
unset($collection);
}

protected function getProductsRecords($storeId, $collection, $potentiallyDeletedProductsIds = null)
private function getProductsRecords($storeId, $collection, $potentiallyDeletedProductsIds = null)
{
$productsToIndex = [];
$productsToRemove = [];
Expand Down
Loading

0 comments on commit fb2dbeb

Please sign in to comment.