Skip to content

Commit

Permalink
Change private methods in ReportRepository to protected
Browse files Browse the repository at this point in the history
  • Loading branch information
maximehuran committed Jan 14, 2020
1 parent c5b5e1a commit eb225e1
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/Repository/ReportRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ public function getProductSalesForChannelForDates(
* @param \DateTimeInterface $to
* @return array
*/
private function getOrderItemUnitValues(
protected function getOrderItemUnitValues(
ChannelInterface $channel,
\DateTimeInterface $from,
\DateTimeInterface $to
Expand All @@ -314,7 +314,7 @@ private function getOrderItemUnitValues(
* @param \DateTimeInterface $to
* @return array
*/
private function getOrderItemValues(
protected function getOrderItemValues(
ChannelInterface $channel,
\DateTimeInterface $from,
\DateTimeInterface $to
Expand All @@ -336,7 +336,7 @@ private function getOrderItemValues(
* @param \DateTimeInterface $to
* @return array
*/
private function getOrderValues(
protected function getOrderValues(
ChannelInterface $channel,
\DateTimeInterface $from,
\DateTimeInterface $to
Expand All @@ -358,7 +358,7 @@ private function getOrderValues(
* @param bool $isOrder
* @return string
*/
private function getSelectColumns(bool $isItemUnit = false, bool $isItem = false, bool $isOrder = false): string
protected function getSelectColumns(bool $isItemUnit = false, bool $isItem = false, bool $isOrder = false): string
{
return implode(',',[
// Order ID
Expand Down Expand Up @@ -394,7 +394,7 @@ private function getSelectColumns(bool $isItemUnit = false, bool $isItem = false
* @param bool $isOrder
* @return mixed
*/
private function appendAdjustmentsAndParameters(
protected function appendAdjustmentsAndParameters(
QueryBuilder $queryBuilder,
ChannelInterface $channel,
\DateTimeInterface $from,
Expand Down Expand Up @@ -439,7 +439,7 @@ private function appendAdjustmentsAndParameters(
* @param string $localeCode
* @return array
*/
private function populateOptions(string $localeCode): array
protected function populateOptions(string $localeCode): array
{
$variantOptions = $this->getVariantsOptions($localeCode);
$salesResults = [];
Expand Down Expand Up @@ -473,7 +473,7 @@ private function populateOptions(string $localeCode): array
* @param string $localeCode
* @return array
*/
private function getVariantsOptions(string $localeCode): array
protected function getVariantsOptions(string $localeCode): array
{
$queryBuilder = $this->productVariantRepository->createQueryBuilder('v')
->select('v.id AS variant_id, option.code AS option_code, option_translation.name AS option_label, option_value.code AS option_value_code, option_value_translation.value AS option_value_label')
Expand Down Expand Up @@ -501,7 +501,7 @@ private function getVariantsOptions(string $localeCode): array
/**
* Init the result with 0 totals
*/
private function initResult()
protected function initResult()
{
$this->result = [
'without_tax_total' => 0,
Expand All @@ -520,7 +520,7 @@ private function initResult()
* @param array $elementResults
* @param string|null $groupField
*/
private function addResults(array $elementResults, ?string $groupField = null): void
protected function addResults(array $elementResults, ?string $groupField = null): void
{
// Loop on given elements to increments current result
foreach ($elementResults as $elementResult) {
Expand Down Expand Up @@ -548,7 +548,7 @@ private function addResults(array $elementResults, ?string $groupField = null):
* @param string|null $labelField
* @param array|null $extraFields
*/
private function addResultsByElement(array $elementResults, string $groupField, ?string $labelField = null, ?array $extraFields = null): void
protected function addResultsByElement(array $elementResults, string $groupField, ?string $labelField = null, ?array $extraFields = null): void
{
// Loop on given elements to increments current result
foreach ($elementResults as $elementResult) {
Expand Down Expand Up @@ -595,7 +595,7 @@ private function addResultsByElement(array $elementResults, string $groupField,
/**
* Make the average of results depending on number of elements
*/
private function averageResult(): void
protected function averageResult(): void
{
if (!empty($this->elements)) {
$numberOfElements = count($this->elements);
Expand Down

0 comments on commit eb225e1

Please sign in to comment.