Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spry-2561 Change access modifiers to protected for several class prop… #7

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,42 +21,42 @@ class ProductReader
/**
* @var string
*/
private const CATEGORY_ID = 'categoryId';
protected const CATEGORY_ID = 'categoryId';

/**
* @var string
*/
private const CATEGORY = 'category';
protected const CATEGORY = 'category';

/**
* @var string
*/
private const KEY_PRODUCTS_PER_PAGE = 'ipp';
protected const KEY_PRODUCTS_PER_PAGE = 'ipp';

/**
* @var \Spryker\Client\ProductStorage\ProductStorageClientInterface
*/
private ProductStorageClientInterface $productStorageClient;
protected ProductStorageClientInterface $productStorageClient;

/**
* @var \Spryker\Client\Catalog\CatalogClientInterface
*/
private CatalogClientInterface $catalogClient;
protected CatalogClientInterface $catalogClient;

/**
* @var \ValanticSpryker\Zed\ProductFirstSpiritApi\Business\Mapper\ProductFirstSpiritApiBusinessMapperInterface
*/
private ProductFirstSpiritApiBusinessMapperInterface $businessMapper;
protected ProductFirstSpiritApiBusinessMapperInterface $businessMapper;

/**
* @var \ValanticSpryker\Zed\FirstSpiritApi\FirstSpiritApiConfig
*/
private FirstSpiritApiConfig $firstSpiritApiConfig;
protected FirstSpiritApiConfig $firstSpiritApiConfig;

/**
* @var \Spryker\Zed\Locale\Business\LocaleFacadeInterface
*/
private LocaleFacadeInterface $localeFacade;
protected LocaleFacadeInterface $localeFacade;

/**
* @param \Spryker\Client\ProductStorage\ProductStorageClientInterface $productStorageClient
Expand All @@ -72,7 +72,7 @@ public function __construct(
LocaleFacadeInterface $localeFacade,
ProductFirstSpiritApiBusinessMapperInterface $businessMapper,
FirstSpiritApiConfig $firstSpiritApiConfig,
private array $queryDataExpanderPlugins = []
protected array $queryDataExpanderPlugins = []
) {
$this->productStorageClient = $productStorageClient;
$this->catalogClient = $catalogClient;
Expand Down Expand Up @@ -143,7 +143,7 @@ public function getAllProducts(FirstSpiritApiRequestTransfer $apiRequestTransfer
*
* @return string
*/
private function getRequestParameter(array $queryData, string $parameterName): string
protected function getRequestParameter(array $queryData, string $parameterName): string
{
if (array_key_exists($parameterName, $queryData)) {
return $queryData[$parameterName];
Expand All @@ -159,7 +159,7 @@ private function getRequestParameter(array $queryData, string $parameterName): s
*
* @return array
*/
private function replaceOldArrayKeyWithNewArrayKey(array $queryData, string $oldKey, string $newKey): array
protected function replaceOldArrayKeyWithNewArrayKey(array $queryData, string $oldKey, string $newKey): array
{
if (array_key_exists($oldKey, $queryData)) {
$keys = array_keys($queryData);
Expand All @@ -176,7 +176,7 @@ private function replaceOldArrayKeyWithNewArrayKey(array $queryData, string $old
*
* @return string
*/
private function getLocaleFromRequestParameters(array $parameters): string
protected function getLocaleFromRequestParameters(array $parameters): string
{
$currentLocale = $this->localeFacade->getCurrentLocaleName();
if (!isset($parameters[CmsFirstSpiritApiConfig::FIRST_SPIRIT_PAGE_LANGUAGE])) {
Expand Down Expand Up @@ -207,7 +207,7 @@ protected function adjustQueryData($queryData): array
*
* @return array
*/
private function extendQueryData(array $queryData): array
protected function extendQueryData(array $queryData): array
{
foreach ($this->queryDataExpanderPlugins as $queryExpanderPlugin) {
$queryData = $queryExpanderPlugin->expandQueryData($queryData);
Expand Down
Loading