Skip to content

Commit

Permalink
Small adjustments and logic fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mxr576 committed May 8, 2019
1 parent 840518f commit 5eb182c
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 36 deletions.
24 changes: 12 additions & 12 deletions src/Api/Management/Query/StatsQueryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function getMetrics(): array;
/**
* @param string[] $metrics
*
* @return StatsQueryInterface
* @return \Apigee\Edge\Api\Management\Query\StatsQueryInterface
*/
public function setMetrics(array $metrics): StatsQueryInterface;

Expand All @@ -49,7 +49,7 @@ public function getTimeRange(): Period;
/**
* @param Period $timeRange
*
* @return StatsQueryInterface
* @return \Apigee\Edge\Api\Management\Query\StatsQueryInterface
*/
public function setTimeRange(Period $timeRange): StatsQueryInterface;

Expand All @@ -61,7 +61,7 @@ public function getTimeUnit(): ?string;
/**
* @param string|null $timeUnit
*
* @return StatsQueryInterface
* @return \Apigee\Edge\Api\Management\Query\StatsQueryInterface
*/
public function setTimeUnit(?string $timeUnit): StatsQueryInterface;

Expand All @@ -73,7 +73,7 @@ public function getSortBy(): ?string;
/**
* @param string|null $sortBy
*
* @return StatsQueryInterface
* @return \Apigee\Edge\Api\Management\Query\StatsQueryInterface
*/
public function setSortBy(?string $sortBy): StatsQueryInterface;

Expand All @@ -85,7 +85,7 @@ public function getSort(): ?string;
/**
* @param string|null $sort
*
* @return StatsQueryInterface
* @return \Apigee\Edge\Api\Management\Query\StatsQueryInterface
*/
public function setSort(?string $sort): StatsQueryInterface;

Expand All @@ -97,7 +97,7 @@ public function getTopK(): ?int;
/**
* @param int|null $topK
*
* @return StatsQueryInterface
* @return \Apigee\Edge\Api\Management\Query\StatsQueryInterface
*/
public function setTopK(?int $topK): StatsQueryInterface;

Expand All @@ -109,7 +109,7 @@ public function getLimit(): ?int;
/**
* @param int|null $limit
*
* @return StatsQueryInterface
* @return \Apigee\Edge\Api\Management\Query\StatsQueryInterface
*/
public function setLimit(?int $limit): StatsQueryInterface;

Expand All @@ -121,7 +121,7 @@ public function getOffset(): ?int;
/**
* @param int|null $offset
*
* @return StatsQueryInterface
* @return \Apigee\Edge\Api\Management\Query\StatsQueryInterface
*/
public function setOffset(?int $offset): StatsQueryInterface;

Expand All @@ -133,7 +133,7 @@ public function getRealtime(): ?bool;
/**
* @param bool|null $realtime
*
* @return StatsQueryInterface
* @return \Apigee\Edge\Api\Management\Query\StatsQueryInterface
*/
public function setRealtime(?bool $realtime): StatsQueryInterface;

Expand All @@ -145,7 +145,7 @@ public function getAccuracy(): ?int;
/**
* @param int|null $accuracy
*
* @return StatsQueryInterface
* @return \Apigee\Edge\Api\Management\Query\StatsQueryInterface
*/
public function setAccuracy(?int $accuracy): StatsQueryInterface;

Expand All @@ -157,7 +157,7 @@ public function getTsAscending(): bool;
/**
* @param bool $tsAscending
*
* @return StatsQueryInterface
* @return \Apigee\Edge\Api\Management\Query\StatsQueryInterface
*/
public function setTsAscending(bool $tsAscending): StatsQueryInterface;

Expand All @@ -169,7 +169,7 @@ public function getFilter(): ?string;
/**
* @param string|null $filter
*
* @return StatsQuery
* @return \Apigee\Edge\Api\Management\Query\StatsQueryInterface
*
* @see https://docs.apigee.com/analytics-services/reference/analytics-reference#filters
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@

namespace Apigee\Edge\Api\Monetization\Entity;

interface CompanyAcceptedRatePlanInterface extends AcceptedRatePlanInterface
use Apigee\Edge\Api\Monetization\Entity\Property\CompanyPropertyInterface;

interface CompanyAcceptedRatePlanInterface extends AcceptedRatePlanInterface, CompanyPropertyInterface
{
/**
* @return \Apigee\Edge\Api\Monetization\Entity\CompanyInterface|null
* It can be null only when a new rate plan gets accepted.
*/
public function getCompany(): ?CompanyInterface;
}
4 changes: 2 additions & 2 deletions src/Api/Monetization/Entity/Developer.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ class Developer extends LegalEntity implements DeveloperInterface
protected $company;

/**
* @return \Apigee\Edge\Api\Monetization\Entity\Company|null
* @inheritdoc
*/
public function getCompany(): ?Company
public function getCompany(): ?CompanyInterface
{
return $this->company;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@

namespace Apigee\Edge\Api\Monetization\Entity;

interface DeveloperAcceptedRatePlanInterface extends AcceptedRatePlanInterface
use Apigee\Edge\Api\Monetization\Entity\Property\DeveloperPropertyInterface;

interface DeveloperAcceptedRatePlanInterface extends AcceptedRatePlanInterface, DeveloperPropertyInterface
{
/**
* @return \Apigee\Edge\Api\Monetization\Entity\DeveloperInterface|null
* It can be null only when a new rate plan gets accepted.
*/
public function getDeveloper(): ?DeveloperInterface;
}
8 changes: 3 additions & 5 deletions src/Api/Monetization/Entity/DeveloperInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@

namespace Apigee\Edge\Api\Monetization\Entity;

interface DeveloperInterface extends LegalEntityInterface
use Apigee\Edge\Api\Monetization\Entity\Property\CompanyPropertyInterface;

interface DeveloperInterface extends LegalEntityInterface, CompanyPropertyInterface
{
/**
* @return \Apigee\Edge\Api\Monetization\Entity\Company|null
*/
public function getCompany(): ?Company;
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public function getCompany(): ?CompanyInterface

/**
* @inheritdoc
*
* @internal
*/
public function setCompany(CompanyInterface $company): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ class CompanyAcceptedRatePlanNameConverter extends NameConverterBase implements
*/
protected function getExternalToLocalMapping(): array
{
$mapping = [
'developer' => 'company',
];

return $mapping;
return [
'developer' => 'company',
];
}
}

0 comments on commit 5eb182c

Please sign in to comment.