diff --git a/.github/workflows/php-test-workflow.yml b/.github/workflows/php-test-workflow.yml
index b1c2b78ee..3fa536aa2 100644
--- a/.github/workflows/php-test-workflow.yml
+++ b/.github/workflows/php-test-workflow.yml
@@ -19,6 +19,10 @@ jobs:
dependencies-preference: " "
- php: '8.3'
dependencies-preference: "--prefer-lowest"
+ - php: '8.4'
+ dependencies-preference: " "
+ - php: '8.4'
+ dependencies-preference: "--prefer-lowest"
fail-fast: false
steps:
- uses: actions/checkout@v4
diff --git a/composer.json b/composer.json
index 7ae14bd88..111306d60 100644
--- a/composer.json
+++ b/composer.json
@@ -13,7 +13,7 @@
"homepage": "http://github.com/apigee/apigee-client-php",
"license": "Apache-2.0",
"require": {
- "php": "~8.2 || ~8.3",
+ "php": "~8.2 || ~8.3 || ~8.4",
"ext-json": "*",
"ext-openssl": "*",
"ext-reflection": "*",
@@ -47,7 +47,24 @@
"phpunit/phpunit": "^9.6",
"sebastian/comparator": "^4.0.5",
"symfony/cache": "^6.4.9",
- "vimeo/psalm": "^5.20"
+ "vimeo/psalm": "^6.14.0",
+ "amphp/amp": "^3.1.1",
+ "amphp/byte-stream": "^2.1.2",
+ "amphp/cache": "^2.0.1",
+ "amphp/dns": "^2.4.1",
+ "amphp/parallel": "^2.3.3",
+ "amphp/parser": "^1.1.1",
+ "amphp/socket": "^2.4.0",
+ "daverandom/libdns": "^2.1.0",
+ "symfony/console": "^6.4.36 || ^7.0",
+ "spatie/array-to-xml": "^3.4.4",
+ "nikic/php-parser": "^5.7.0",
+ "amphp/pipeline": "^1.2.3",
+ "amphp/process": "^2.0.3",
+ "amphp/serialization": "^1.1.0",
+ "amphp/sync": "^2.0",
+ "revolt/event-loop": "^1.1.0",
+ "symfony/filesystem": "^7.4.8"
},
"autoload": {
"psr-4": {
diff --git a/psalm.xml.dist b/psalm.xml.dist
index 065e811dd..ffba09009 100644
--- a/psalm.xml.dist
+++ b/psalm.xml.dist
@@ -55,5 +55,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Api/ApigeeX/Controller/AcceptedRatePlanController.php b/src/Api/ApigeeX/Controller/AcceptedRatePlanController.php
index 29f19c564..23df4fa88 100755
--- a/src/Api/ApigeeX/Controller/AcceptedRatePlanController.php
+++ b/src/Api/ApigeeX/Controller/AcceptedRatePlanController.php
@@ -89,7 +89,7 @@ public function acceptRatePlan(RatePlanInterface $ratePlan): AcceptedRatePlanInt
$tmp = json_decode($payload, true);
- $payload = json_encode($tmp);
+ $payload = (string) json_encode($tmp);
$response = $this->client->post($this->getBaseEndpointUri(), $payload);
$this->getEntitySerializer()->setPropertiesFromResponse($response, $acceptedRatePlan);
@@ -144,7 +144,7 @@ protected function alterRequestPayload(array &$payload, AcceptedRatePlanInterfac
* @param array $query_params
* Additional query parameters.
*
- * @return \Apigee\Edge\Api\ApigeeX\Entity\AcceptedRatePlanInterface[]
+ * @return AcceptedRatePlanInterface[]
*
* @psalm-suppress PossiblyNullArrayOffset - id() does not return null here.
*/
diff --git a/src/Api/ApigeeX/Controller/AcceptedRatePlanControllerInterface.php b/src/Api/ApigeeX/Controller/AcceptedRatePlanControllerInterface.php
index 07971226c..63541dc08 100755
--- a/src/Api/ApigeeX/Controller/AcceptedRatePlanControllerInterface.php
+++ b/src/Api/ApigeeX/Controller/AcceptedRatePlanControllerInterface.php
@@ -35,7 +35,7 @@ interface AcceptedRatePlanControllerInterface extends
/**
* Gets all accepted rate plans.
*
- * @return \Apigee\Edge\Api\ApigeeX\Entity\AcceptedRatePlanInterface[]
+ * @return AcceptedRatePlanInterface[]
*/
public function getAllAcceptedRatePlans(): array;
@@ -45,7 +45,7 @@ public function getAllAcceptedRatePlans(): array;
* @param int|null $limit
* @param int $page
*
- * @return \Apigee\Edge\Api\ApigeeX\Entity\AcceptedRatePlanInterface[]
+ * @return AcceptedRatePlanInterface[]
*/
public function getPaginatedAcceptedRatePlanList(?int $limit = null, int $page = 1): array;
diff --git a/src/Api/ApigeeX/Controller/ApiProductController.php b/src/Api/ApigeeX/Controller/ApiProductController.php
index 696eb99a9..cab90d971 100755
--- a/src/Api/ApigeeX/Controller/ApiProductController.php
+++ b/src/Api/ApigeeX/Controller/ApiProductController.php
@@ -134,7 +134,7 @@ private function getEligibleProducts(string $type, string $entityId): array
}
}
- $current_ms = substr((string) (microtime(true) * 1000), 0);
+ $current_ms = substr((string) ((int) (microtime(true) * 1000.0)), 0);
foreach ($this->getAvailablexApiProducts($type, $entityId, true) as $item) {
// Create a new rate plan controller.
diff --git a/src/Api/ApigeeX/Controller/AppControllerInterface.php b/src/Api/ApigeeX/Controller/AppControllerInterface.php
index dc9f7f275..0e0822b91 100644
--- a/src/Api/ApigeeX/Controller/AppControllerInterface.php
+++ b/src/Api/ApigeeX/Controller/AppControllerInterface.php
@@ -82,7 +82,7 @@ public function listAppIds(?PagerInterface $pager = null): array;
* @param PagerInterface|null $pager
* Number of results to return.
*
- * @return \Apigee\Edge\Api\Management\Entity\AppInterface[]
+ * @return AppInterface[]
* An array that can contain both developer- and appgroup app entities.
*/
public function listApps(bool $includeCredentials = false, ?PagerInterface $pager = null): array;
@@ -110,7 +110,7 @@ public function listAppIdsByStatus(string $status, ?PagerInterface $pager = null
* @param PagerInterface|null $pager
* Number of results to return.
*
- * @return \Apigee\Edge\Api\Management\Entity\AppInterface[]
+ * @return AppInterface[]
* An array that can contain both developer- and appgroup app entities.
*/
public function listAppsByStatus(
diff --git a/src/Api/ApigeeX/Controller/PaginationHelperTrait.php b/src/Api/ApigeeX/Controller/PaginationHelperTrait.php
index 87fd0c153..976c9fd99 100644
--- a/src/Api/ApigeeX/Controller/PaginationHelperTrait.php
+++ b/src/Api/ApigeeX/Controller/PaginationHelperTrait.php
@@ -112,46 +112,45 @@ protected function listEntities(?PagerInterface $pager = null, array $query_para
$responseArray = reset($responseArray);
return $this->responseArrayToArrayOfEntities($responseArray, $key_provider);
- } else {
- // Default page size set to 1000, because the AppGroupApps endpoint
- // does not return nextPageToken unless a pageSize is specified
- // in the request parameters.
- $pageSize = 1000;
- // Pass an empty pager to load all entities.
- $responseArray = $this->getResultsInRange($this->createPager($pageSize), $query_params);
- // Check flag 'nextPageToken' to get next items from the list.
- $nextPageToken = array_key_exists('nextPageToken', $responseArray) ? $responseArray['nextPageToken'] : false;
- // Ignore entity type key from response, ex.: developer, apiproduct,
- // etc.
- $responseArray = reset($responseArray);
- // Appgroup can be empty.
- if (empty($responseArray) || !is_array($responseArray)) {
- return [];
- }
- $entities = $this->responseArrayToArrayOfEntities($responseArray, $key_provider);
-
- if ($nextPageToken) {
- do {
- $tmp = $this->getResultsInRange($this->createPager($pageSize, $nextPageToken), $query_params);
- // Check the flag 'nextPageToken' to get next items from the list.
- $nextPageToken = array_key_exists('nextPageToken', $tmp) ? $tmp['nextPageToken'] : false;
- // Ignore entity type key from response, ex.: developer,
- // apiproduct, etc.
- $tmp = reset($tmp);
- // Remove the first item from the list because it is the same
- // as the last item of $entities at this moment.
- // Apigee X response always starts with the requested entity
- // (pageToken).
- array_shift($tmp);
- $tmpEntities = $this->responseArrayToArrayOfEntities($tmp, $key_provider);
- // The returned entity array is keyed by entity id which
- // is unique so we can do this.
- $entities += $tmpEntities;
- } while ($nextPageToken);
- }
-
- return $entities;
}
+ // Default page size set to 1000, because the AppGroupApps endpoint
+ // does not return nextPageToken unless a pageSize is specified
+ // in the request parameters.
+ $pageSize = 1000;
+ // Pass an empty pager to load all entities.
+ $responseArray = $this->getResultsInRange($this->createPager($pageSize), $query_params);
+ // Check flag 'nextPageToken' to get next items from the list.
+ $nextPageToken = array_key_exists('nextPageToken', $responseArray) ? $responseArray['nextPageToken'] : false;
+ // Ignore entity type key from response, ex.: developer, apiproduct,
+ // etc.
+ $responseArray = reset($responseArray);
+ // Appgroup can be empty.
+ if (empty($responseArray) || !is_array($responseArray)) {
+ return [];
+ }
+ $entities = $this->responseArrayToArrayOfEntities($responseArray, $key_provider);
+
+ if ($nextPageToken) {
+ do {
+ $tmp = $this->getResultsInRange($this->createPager($pageSize, $nextPageToken), $query_params);
+ // Check the flag 'nextPageToken' to get next items from the list.
+ $nextPageToken = array_key_exists('nextPageToken', $tmp) ? $tmp['nextPageToken'] : false;
+ // Ignore entity type key from response, ex.: developer,
+ // apiproduct, etc.
+ $tmp = reset($tmp);
+ // Remove the first item from the list because it is the same
+ // as the last item of $entities at this moment.
+ // Apigee X response always starts with the requested entity
+ // (pageToken).
+ array_shift($tmp);
+ $tmpEntities = $this->responseArrayToArrayOfEntities($tmp, $key_provider);
+ // The returned entity array is keyed by entity id which
+ // is unique so we can do this.
+ $entities += $tmpEntities;
+ } while ($nextPageToken);
+ }
+
+ return $entities;
}
/**
diff --git a/src/Api/ApigeeX/Controller/PrepaidBalanceController.php b/src/Api/ApigeeX/Controller/PrepaidBalanceController.php
index bc0f81b47..1544107e9 100755
--- a/src/Api/ApigeeX/Controller/PrepaidBalanceController.php
+++ b/src/Api/ApigeeX/Controller/PrepaidBalanceController.php
@@ -118,7 +118,7 @@ abstract protected function getPrepaidBalanceEndpoint(): UriInterface;
*
* @param string|null $currencyCode
*
- * @return \Apigee\Edge\Api\ApigeeX\Entity\PrepaidBalanceInterface[]
+ * @return PrepaidBalanceInterface[]
*
* @psalm-suppress PossiblyNullArrayOffset - id() does not return null here.
*/
diff --git a/src/Api/ApigeeX/Controller/PrepaidBalanceControllerInterface.php b/src/Api/ApigeeX/Controller/PrepaidBalanceControllerInterface.php
index a5637a23d..d5c362c05 100755
--- a/src/Api/ApigeeX/Controller/PrepaidBalanceControllerInterface.php
+++ b/src/Api/ApigeeX/Controller/PrepaidBalanceControllerInterface.php
@@ -37,7 +37,7 @@ public function topUpBalance($amount, $amountnano, string $currencyCode, string
/**
* Gets prepaid balances.
*
- * @return \Apigee\Edge\Api\ApigeeX\Entity\PrepaidBalanceInterface[]
+ * @return PrepaidBalanceInterface[]
*/
public function getPrepaidBalance(): array;
}
diff --git a/src/Api/ApigeeX/Controller/RatePlanController.php b/src/Api/ApigeeX/Controller/RatePlanController.php
index bb5f414f8..32871ef7a 100755
--- a/src/Api/ApigeeX/Controller/RatePlanController.php
+++ b/src/Api/ApigeeX/Controller/RatePlanController.php
@@ -92,7 +92,7 @@ public function getEntities(?bool $showCurrentOnly = null, ?bool $showPrivate =
public function createNewRevision(RatePlanRevisionInterface $entity): void
{
$payload = $this->getEntitySerializer()->serialize($entity, 'json');
- $response = $this->getClient()->post($this->getEntityEndpointUri($entity->getPreviousRatePlanRevision()->id()) . '/revision', $payload);
+ $response = $this->getClient()->post((string) $this->getEntityEndpointUri($entity->getPreviousRatePlanRevision()->id()) . '/revision', $payload);
$this->getEntitySerializer()->setPropertiesFromResponse($response, $entity);
}
diff --git a/src/Api/ApigeeX/Denormalizer/AcceptedRatePlanDenormalizer.php b/src/Api/ApigeeX/Denormalizer/AcceptedRatePlanDenormalizer.php
index 4a8130b5c..e273b71c4 100755
--- a/src/Api/ApigeeX/Denormalizer/AcceptedRatePlanDenormalizer.php
+++ b/src/Api/ApigeeX/Denormalizer/AcceptedRatePlanDenormalizer.php
@@ -50,6 +50,6 @@ public function supportsDenormalization($data, $type, $format = null)
return false;
}
- return AcceptedRatePlanInterface::class === $type || $type instanceof AcceptedRatePlanInterface || in_array(AcceptedRatePlanInterface::class, class_implements($type));
+ return AcceptedRatePlanInterface::class === $type || $type instanceof AcceptedRatePlanInterface || in_array(AcceptedRatePlanInterface::class, class_implements($type) ?: []);
}
}
diff --git a/src/Api/ApigeeX/Denormalizer/ApiProductDenormalizer.php b/src/Api/ApigeeX/Denormalizer/ApiProductDenormalizer.php
index 51b009515..020e7c89c 100755
--- a/src/Api/ApigeeX/Denormalizer/ApiProductDenormalizer.php
+++ b/src/Api/ApigeeX/Denormalizer/ApiProductDenormalizer.php
@@ -52,6 +52,6 @@ public function supportsDenormalization($data, $type, $format = null)
return false;
}
- return ApiProductInterface::class === $type || $type instanceof ApiProductInterface || in_array(ApiProductInterface::class, class_implements($type));
+ return ApiProductInterface::class === $type || $type instanceof ApiProductInterface || in_array(ApiProductInterface::class, class_implements($type) ?: []);
}
}
diff --git a/src/Api/ApigeeX/Denormalizer/AppDenormalizer.php b/src/Api/ApigeeX/Denormalizer/AppDenormalizer.php
index 89e048fce..9da9d4931 100644
--- a/src/Api/ApigeeX/Denormalizer/AppDenormalizer.php
+++ b/src/Api/ApigeeX/Denormalizer/AppDenormalizer.php
@@ -68,7 +68,7 @@ public function supportsDenormalization($data, $type, $format = null)
return false;
}
- return AppInterface::class === $type || $type instanceof AppInterface || in_array(AppInterface::class, class_implements($type));
+ return AppInterface::class === $type || $type instanceof AppInterface || in_array(AppInterface::class, class_implements($type) ?: []);
}
/**
diff --git a/src/Api/ApigeeX/Denormalizer/BillingTypeDenormalizer.php b/src/Api/ApigeeX/Denormalizer/BillingTypeDenormalizer.php
index ab98d1297..bdfffe380 100644
--- a/src/Api/ApigeeX/Denormalizer/BillingTypeDenormalizer.php
+++ b/src/Api/ApigeeX/Denormalizer/BillingTypeDenormalizer.php
@@ -44,6 +44,6 @@ public function supportsDenormalization($data, $type, $format = null)
return false;
}
- return BillingTypeInterface::class === $type || $type instanceof BillingTypeInterface || in_array(BillingTypeInterface::class, class_implements($type));
+ return BillingTypeInterface::class === $type || $type instanceof BillingTypeInterface || in_array(BillingTypeInterface::class, class_implements($type) ?: []);
}
}
diff --git a/src/Api/ApigeeX/Denormalizer/PrepaidBalanceDenormalizer.php b/src/Api/ApigeeX/Denormalizer/PrepaidBalanceDenormalizer.php
index ea42fe34e..9c4c380f8 100755
--- a/src/Api/ApigeeX/Denormalizer/PrepaidBalanceDenormalizer.php
+++ b/src/Api/ApigeeX/Denormalizer/PrepaidBalanceDenormalizer.php
@@ -52,6 +52,6 @@ public function supportsDenormalization($data, $type, $format = null)
return false;
}
- return PrepaidBalanceInterface::class === $type || $type instanceof PrepaidBalanceInterface || in_array(PrepaidBalanceInterface::class, class_implements($type));
+ return PrepaidBalanceInterface::class === $type || $type instanceof PrepaidBalanceInterface || in_array(PrepaidBalanceInterface::class, class_implements($type) ?: []);
}
}
diff --git a/src/Api/ApigeeX/Denormalizer/RatePlanDenormalizer.php b/src/Api/ApigeeX/Denormalizer/RatePlanDenormalizer.php
index 1494d83e4..12ea67a5f 100755
--- a/src/Api/ApigeeX/Denormalizer/RatePlanDenormalizer.php
+++ b/src/Api/ApigeeX/Denormalizer/RatePlanDenormalizer.php
@@ -72,6 +72,6 @@ public function supportsDenormalization($data, $type, $format = null)
return false;
}
- return RatePlanInterface::class === $type || $type instanceof RatePlanInterface || in_array(RatePlanInterface::class, class_implements($type));
+ return RatePlanInterface::class === $type || $type instanceof RatePlanInterface || in_array(RatePlanInterface::class, class_implements($type) ?: []);
}
}
diff --git a/src/Api/ApigeeX/Denormalizer/RatePlanDenormalizerFactory.php b/src/Api/ApigeeX/Denormalizer/RatePlanDenormalizerFactory.php
index c64cca650..2ef7e87eb 100755
--- a/src/Api/ApigeeX/Denormalizer/RatePlanDenormalizerFactory.php
+++ b/src/Api/ApigeeX/Denormalizer/RatePlanDenormalizerFactory.php
@@ -32,13 +32,13 @@ class RatePlanDenormalizerFactory implements DenormalizerInterface, SerializerAw
setSerializer as private traitSetSerializer;
}
- /** @var \Symfony\Component\Serializer\Normalizer\DenormalizerInterface[] */
+ /** @var DenormalizerInterface[] */
protected $denormalizers = [];
/**
* RatePlanDenormalizerFactory constructor.
*
- * @param \Symfony\Component\Serializer\Normalizer\DenormalizerInterface[] $denormalizers
+ * @param DenormalizerInterface[] $denormalizers
*/
public function __construct(array $denormalizers = [])
{
diff --git a/src/Api/ApigeeX/Entity/Property/NanosPropertyAwareTrait.php b/src/Api/ApigeeX/Entity/Property/NanosPropertyAwareTrait.php
index 47bc2e201..f049eaab6 100755
--- a/src/Api/ApigeeX/Entity/Property/NanosPropertyAwareTrait.php
+++ b/src/Api/ApigeeX/Entity/Property/NanosPropertyAwareTrait.php
@@ -33,9 +33,9 @@ trait NanosPropertyAwareTrait
*/
public function getNanos(): ?float
{
- $nanos = $this->nanos ?? 0;
+ $nanos = $this->nanos ?? 0.0;
- return $nanos * pow(10, -9);
+ return $nanos * 1e-9;
}
/**
diff --git a/src/Api/ApigeeX/Entity/RatePlan.php b/src/Api/ApigeeX/Entity/RatePlan.php
index 431889b7e..201cfd8cf 100755
--- a/src/Api/ApigeeX/Entity/RatePlan.php
+++ b/src/Api/ApigeeX/Entity/RatePlan.php
@@ -63,16 +63,16 @@ abstract class RatePlan extends Entity implements RatePlanInterface
*/
protected $package;
- /** @var \Apigee\Edge\Api\ApigeeX\Structure\RatePlanXFee[] */
+ /** @var RatePlanXFee[] */
protected $ratePlanXFee = [];
- /** @var \Apigee\Edge\Api\ApigeeX\Structure\FixedRecurringFee[] */
+ /** @var FixedRecurringFee[] */
protected $fixedRecurringFee = [];
- /** @var \Apigee\Edge\Api\ApigeeX\Structure\ConsumptionPricingRate[] */
+ /** @var ConsumptionPricingRate[] */
protected $consumptionPricingRates = [];
- /** @var \Apigee\Edge\Api\ApigeeX\Structure\RevenueShareRates[] */
+ /** @var RevenueShareRates[] */
protected $revenueShareRates = [];
/**
diff --git a/src/Api/ApigeeX/Entity/RatePlanInterface.php b/src/Api/ApigeeX/Entity/RatePlanInterface.php
index 34d8e529c..16677ca78 100755
--- a/src/Api/ApigeeX/Entity/RatePlanInterface.php
+++ b/src/Api/ApigeeX/Entity/RatePlanInterface.php
@@ -68,7 +68,7 @@ public function getPackage(): ?ApiProductInterface;
public function setPackage(ApiProductInterface $package): void;
/**
- * @return \Apigee\Edge\Api\ApigeeX\Structure\RatePlanXFee[]
+ * @return RatePlanXFee[]
*/
public function getRatePlanxFee(): array;
@@ -78,7 +78,7 @@ public function getRatePlanxFee(): array;
public function setRatePlanxFee(RatePlanXFee ...$ratePlanXFee): void;
/**
- * @return \Apigee\Edge\Api\ApigeeX\Structure\FixedRecurringFee[]
+ * @return FixedRecurringFee[]
*/
public function getFixedRecurringFee(): array;
@@ -88,7 +88,7 @@ public function getFixedRecurringFee(): array;
public function setFixedRecurringFee(FixedRecurringFee ...$fixedRecurringFee): void;
/**
- * @return \Apigee\Edge\Api\ApigeeX\Structure\ConsumptionPricingRate[]
+ * @return ConsumptionPricingRate[]
*/
public function getConsumptionPricingRates(): array;
@@ -98,7 +98,7 @@ public function getConsumptionPricingRates(): array;
public function setConsumptionPricingRates(ConsumptionPricingRate ...$consumptionPricingRates): void;
/**
- * @return \Apigee\Edge\Api\ApigeeX\Structure\RevenueShareRates[]
+ * @return RevenueShareRates[]
*/
public function getRevenueShareRates(): array;
diff --git a/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php b/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php
index 3debb38aa..d55ff7861 100755
--- a/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php
+++ b/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php
@@ -32,13 +32,13 @@ class RatePlanNormalizerFactory implements NormalizerInterface, SerializerAwareI
setSerializer as private traitSetSerializer;
}
- /** @var \Symfony\Component\Serializer\Normalizer\NormalizerInterface[] */
+ /** @var NormalizerInterface[] */
protected $normalizers = [];
/**
* RatePlanDenormalizerFactory constructor.
*
- * @param \Symfony\Component\Serializer\Normalizer\NormalizerInterface[] $normalizers
+ * @param NormalizerInterface[] $normalizers
*/
public function __construct(array $normalizers = [])
{
diff --git a/src/Api/Management/Controller/AppControllerInterface.php b/src/Api/Management/Controller/AppControllerInterface.php
index 0896bbc57..8f29f6bea 100644
--- a/src/Api/Management/Controller/AppControllerInterface.php
+++ b/src/Api/Management/Controller/AppControllerInterface.php
@@ -82,7 +82,7 @@ public function listAppIds(?PagerInterface $pager = null): array;
* @param PagerInterface|null $pager
* Number of results to return.
*
- * @return \Apigee\Edge\Api\Management\Entity\AppInterface[]
+ * @return AppInterface[]
* An array that can contain both developer- and company app entities.
*/
public function listApps(bool $includeCredentials = false, ?PagerInterface $pager = null): array;
@@ -110,7 +110,7 @@ public function listAppIdsByStatus(string $status, ?PagerInterface $pager = null
* @param PagerInterface|null $pager
* Number of results to return.
*
- * @return \Apigee\Edge\Api\Management\Entity\AppInterface[]
+ * @return AppInterface[]
* An array that can contain both developer- and company app entities.
*/
public function listAppsByStatus(
diff --git a/src/Api/Management/Controller/AttributesAwareEntityControllerTrait.php b/src/Api/Management/Controller/AttributesAwareEntityControllerTrait.php
index 5f5f3f820..94de485fb 100644
--- a/src/Api/Management/Controller/AttributesAwareEntityControllerTrait.php
+++ b/src/Api/Management/Controller/AttributesAwareEntityControllerTrait.php
@@ -114,7 +114,7 @@ public function deleteAttribute(string $entityId, string $name): void
protected function getEntityAttributesUri(string $entityId): UriInterface
{
$uri = $this->getEntityEndpointUri($entityId)->withPath(
- $this->getEntityEndpointUri($entityId) . '/attributes'
+ (string) $this->getEntityEndpointUri($entityId) . '/attributes'
);
return $uri;
@@ -132,7 +132,7 @@ protected function getEntityAttributeUri(string $entityId, string $name): UriInt
{
$encoded = rawurlencode($name);
$uri = $this->getEntityAttributesUri($entityId)->withPath(
- $this->getEntityAttributesUri($entityId) . '/' . $encoded
+ (string) $this->getEntityAttributesUri($entityId) . '/' . $encoded
);
return $uri;
diff --git a/src/Api/Management/Denormalizer/AppDenormalizer.php b/src/Api/Management/Denormalizer/AppDenormalizer.php
index 8d8c95ffe..f84ed5a75 100644
--- a/src/Api/Management/Denormalizer/AppDenormalizer.php
+++ b/src/Api/Management/Denormalizer/AppDenormalizer.php
@@ -68,6 +68,6 @@ public function supportsDenormalization($data, $type, $format = null)
return false;
}
- return AppInterface::class === $type || $type instanceof AppInterface || in_array(AppInterface::class, class_implements($type));
+ return AppInterface::class === $type || $type instanceof AppInterface || in_array(AppInterface::class, class_implements($type) ?: []);
}
}
diff --git a/src/Api/Management/Entity/AppInterface.php b/src/Api/Management/Entity/AppInterface.php
index 9e7a7bf24..ddfc36c81 100644
--- a/src/Api/Management/Entity/AppInterface.php
+++ b/src/Api/Management/Entity/AppInterface.php
@@ -80,7 +80,7 @@ public function getCallbackUrl(): ?string;
public function setCallbackUrl(string $callbackUrl): void;
/**
- * @return \Apigee\Edge\Api\Management\Entity\AppCredentialInterface[]
+ * @return AppCredentialInterface[]
*/
public function getCredentials(): array;
}
diff --git a/src/Api/Monetization/Controller/AcceptedRatePlanController.php b/src/Api/Monetization/Controller/AcceptedRatePlanController.php
index 0fdc961ab..d24c7590b 100644
--- a/src/Api/Monetization/Controller/AcceptedRatePlanController.php
+++ b/src/Api/Monetization/Controller/AcceptedRatePlanController.php
@@ -99,7 +99,7 @@ public function acceptRatePlan(RatePlanInterface $ratePlan, DateTimeImmutable $s
if (null !== $waveTerminationCharge) {
$tmp['waveTerminationCharge'] = $waveTerminationCharge ? 'true' : 'false';
}
- $payload = json_encode($tmp);
+ $payload = (string) json_encode($tmp);
$response = $this->client->post($this->getBaseEndpointUri(), $payload);
$this->getEntitySerializer()->setPropertiesFromResponse($response, $acceptedRatePlan);
@@ -122,7 +122,7 @@ public function updateSubscription(AcceptedRatePlanInterface $acceptedRatePlan,
$tmp['waveTerminationCharge'] = $waveTerminationCharge ? 'true' : 'false';
}
$this->alterRequestPayload($tmp, $acceptedRatePlan);
- $payload = json_encode($tmp);
+ $payload = (string) json_encode($tmp);
// Update an existing entity.
$response = $this->client->put($this->getEntityEndpointUri($acceptedRatePlan->id()), $payload);
$this->getEntitySerializer()->setPropertiesFromResponse($response, $acceptedRatePlan);
@@ -164,7 +164,7 @@ protected function alterRequestPayload(array &$payload, AcceptedRatePlanInterfac
* @param array $query_params
* Additional query parameters.
*
- * @return \Apigee\Edge\Api\Monetization\Entity\AcceptedRatePlanInterface[]
+ * @return AcceptedRatePlanInterface[]
*
* @psalm-suppress PossiblyNullArrayOffset - id() does not return null here.
*/
diff --git a/src/Api/Monetization/Controller/AcceptedRatePlanControllerInterface.php b/src/Api/Monetization/Controller/AcceptedRatePlanControllerInterface.php
index c9d6eafbc..7bbcdada1 100644
--- a/src/Api/Monetization/Controller/AcceptedRatePlanControllerInterface.php
+++ b/src/Api/Monetization/Controller/AcceptedRatePlanControllerInterface.php
@@ -37,7 +37,7 @@ interface AcceptedRatePlanControllerInterface extends EntityControllerInterface,
/**
* Gets all accepted rate plans.
*
- * @return \Apigee\Edge\Api\Monetization\Entity\AcceptedRatePlanInterface[]
+ * @return AcceptedRatePlanInterface[]
*/
public function getAllAcceptedRatePlans(): array;
@@ -47,7 +47,7 @@ public function getAllAcceptedRatePlans(): array;
* @param int|null $limit
* @param int $page
*
- * @return \Apigee\Edge\Api\Monetization\Entity\AcceptedRatePlanInterface[]
+ * @return AcceptedRatePlanInterface[]
*/
public function getPaginatedAcceptedRatePlanList(?int $limit = null, int $page = 1): array;
diff --git a/src/Api/Monetization/Controller/LegalEntityTermsAndConditionsControllerInterface.php b/src/Api/Monetization/Controller/LegalEntityTermsAndConditionsControllerInterface.php
index 1b2f571c9..0e0c89136 100644
--- a/src/Api/Monetization/Controller/LegalEntityTermsAndConditionsControllerInterface.php
+++ b/src/Api/Monetization/Controller/LegalEntityTermsAndConditionsControllerInterface.php
@@ -33,7 +33,7 @@ interface LegalEntityTermsAndConditionsControllerInterface extends OrganizationA
* Gets all accepted/declined terms and conditions history events
* for a developer -or company.
*
- * @return \Apigee\Edge\Api\Monetization\Structure\LegalEntityTermsAndConditionsHistoryItem[]
+ * @return LegalEntityTermsAndConditionsHistoryItem[]
*/
public function getTermsAndConditionsHistory(): array;
@@ -42,7 +42,7 @@ public function getTermsAndConditionsHistory(): array;
*
* Specifying audit date is omitted at this moment.
*
- * @see \Apigee\Edge\Api\Monetization\Structure\LegalEntityTermsAndConditionsHistoryItem::$auditDate
+ * @see LegalEntityTermsAndConditionsHistoryItem::$auditDate
*
* @param string $tncId
* Id of a terms and conditions.
@@ -56,7 +56,7 @@ public function acceptTermsAndConditionsById(string $tncId): LegalEntityTermsAnd
*
* Specifying audit date is omitted at this moment.
*
- * @see \Apigee\Edge\Api\Monetization\Structure\LegalEntityTermsAndConditionsHistoryItem::$auditDate
+ * @see LegalEntityTermsAndConditionsHistoryItem::$auditDate
*
* @param string $tncId
* Id of a terms and conditions.
diff --git a/src/Api/Monetization/Controller/PrepaidBalanceController.php b/src/Api/Monetization/Controller/PrepaidBalanceController.php
index 797a8c579..6fa99dd99 100644
--- a/src/Api/Monetization/Controller/PrepaidBalanceController.php
+++ b/src/Api/Monetization/Controller/PrepaidBalanceController.php
@@ -198,7 +198,7 @@ abstract protected function getPrepaidBalanceEndpoint(): UriInterface;
* @param DateTimeImmutable $billingMonth
* @param string|null $currencyCode
*
- * @return \Apigee\Edge\Api\Monetization\Entity\PrepaidBalanceInterface[]
+ * @return PrepaidBalanceInterface[]
*
* @psalm-suppress PossiblyNullArrayOffset - id() does not return null here.
*/
diff --git a/src/Api/Monetization/Controller/PrepaidBalanceControllerInterface.php b/src/Api/Monetization/Controller/PrepaidBalanceControllerInterface.php
index 1f8859088..0a8cee94c 100644
--- a/src/Api/Monetization/Controller/PrepaidBalanceControllerInterface.php
+++ b/src/Api/Monetization/Controller/PrepaidBalanceControllerInterface.php
@@ -67,7 +67,7 @@ public function disableRecurringPayments(string $currencyCode, string $paymentPr
*
* @param DateTimeImmutable $billingMonth
*
- * @return \Apigee\Edge\Api\Monetization\Entity\PrepaidBalanceInterface[]
+ * @return PrepaidBalanceInterface[]
*/
public function getPrepaidBalance(DateTimeImmutable $billingMonth): array;
diff --git a/src/Api/Monetization/Controller/RatePlanController.php b/src/Api/Monetization/Controller/RatePlanController.php
index 148ab2e3e..18e767979 100644
--- a/src/Api/Monetization/Controller/RatePlanController.php
+++ b/src/Api/Monetization/Controller/RatePlanController.php
@@ -79,6 +79,9 @@ public function getEntities(?bool $showCurrentOnly = null, ?bool $showPrivate =
$responseArray = $this->responseToArray($response);
// Ignore entity type key from response, ex.: product.
$responseArray = reset($responseArray);
+ if (!is_array($responseArray)) {
+ $responseArray = [];
+ }
return $this->responseArrayToArrayOfEntities($responseArray);
}
@@ -94,7 +97,7 @@ public function getEntities(?bool $showCurrentOnly = null, ?bool $showPrivate =
public function createNewRevision(RatePlanRevisionInterface $entity): void
{
$payload = $this->getEntitySerializer()->serialize($entity, 'json');
- $response = $this->getClient()->post($this->getEntityEndpointUri($entity->getPreviousRatePlanRevision()->id()) . '/revision', $payload);
+ $response = $this->getClient()->post((string) $this->getEntityEndpointUri($entity->getPreviousRatePlanRevision()->id()) . '/revision', $payload);
$this->getEntitySerializer()->setPropertiesFromResponse($response, $entity);
}
diff --git a/src/Api/Monetization/Denormalizer/AcceptedRatePlanDenormalizer.php b/src/Api/Monetization/Denormalizer/AcceptedRatePlanDenormalizer.php
index a83b2cd3e..81d872df0 100644
--- a/src/Api/Monetization/Denormalizer/AcceptedRatePlanDenormalizer.php
+++ b/src/Api/Monetization/Denormalizer/AcceptedRatePlanDenormalizer.php
@@ -52,6 +52,6 @@ public function supportsDenormalization($data, $type, $format = null)
return false;
}
- return AcceptedRatePlanInterface::class === $type || $type instanceof AcceptedRatePlanInterface || in_array(AcceptedRatePlanInterface::class, class_implements($type));
+ return AcceptedRatePlanInterface::class === $type || $type instanceof AcceptedRatePlanInterface || in_array(AcceptedRatePlanInterface::class, class_implements($type) ?: []);
}
}
diff --git a/src/Api/Monetization/Denormalizer/ApiPackageDenormalizer.php b/src/Api/Monetization/Denormalizer/ApiPackageDenormalizer.php
index 67cc62471..71ff2612b 100644
--- a/src/Api/Monetization/Denormalizer/ApiPackageDenormalizer.php
+++ b/src/Api/Monetization/Denormalizer/ApiPackageDenormalizer.php
@@ -52,6 +52,6 @@ public function supportsDenormalization($data, $type, $format = null)
return false;
}
- return ApiPackageInterface::class === $type || $type instanceof ApiPackageInterface || in_array(ApiPackageInterface::class, class_implements($type));
+ return ApiPackageInterface::class === $type || $type instanceof ApiPackageInterface || in_array(ApiPackageInterface::class, class_implements($type) ?: []);
}
}
diff --git a/src/Api/Monetization/Denormalizer/BalanceDenormalizer.php b/src/Api/Monetization/Denormalizer/BalanceDenormalizer.php
index 1f366af61..338eae3f1 100644
--- a/src/Api/Monetization/Denormalizer/BalanceDenormalizer.php
+++ b/src/Api/Monetization/Denormalizer/BalanceDenormalizer.php
@@ -52,6 +52,6 @@ public function supportsDenormalization($data, $type, $format = null)
return false;
}
- return BalanceInterface::class === $type || $type instanceof BalanceInterface || in_array(BalanceInterface::class, class_implements($type));
+ return BalanceInterface::class === $type || $type instanceof BalanceInterface || in_array(BalanceInterface::class, class_implements($type) ?: []);
}
}
diff --git a/src/Api/Monetization/Denormalizer/LegalEntityDenormalizer.php b/src/Api/Monetization/Denormalizer/LegalEntityDenormalizer.php
index b547b8259..8bce9e167 100644
--- a/src/Api/Monetization/Denormalizer/LegalEntityDenormalizer.php
+++ b/src/Api/Monetization/Denormalizer/LegalEntityDenormalizer.php
@@ -68,9 +68,9 @@ public function denormalize($data, $type, $format = null, array $context = [])
{
if ($data->isCompany) {
return parent::denormalize($data, $this->companyClass, $format, $context);
- } else {
- return parent::denormalize($data, $this->developerClass, $format, $context);
}
+
+ return parent::denormalize($data, $this->developerClass, $format, $context);
}
/**
@@ -83,6 +83,6 @@ public function supportsDenormalization($data, $type, $format = null)
return false;
}
- return LegalEntityInterface::class === $type || $type instanceof LegalEntityInterface || in_array(LegalEntityInterface::class, class_implements($type));
+ return LegalEntityInterface::class === $type || $type instanceof LegalEntityInterface || in_array(LegalEntityInterface::class, class_implements($type) ?: []);
}
}
diff --git a/src/Api/Monetization/Denormalizer/OrganizationProfileDenormalizer.php b/src/Api/Monetization/Denormalizer/OrganizationProfileDenormalizer.php
index 0bfc90663..12a54e161 100644
--- a/src/Api/Monetization/Denormalizer/OrganizationProfileDenormalizer.php
+++ b/src/Api/Monetization/Denormalizer/OrganizationProfileDenormalizer.php
@@ -52,6 +52,6 @@ public function supportsDenormalization($data, $type, $format = null)
return false;
}
- return OrganizationProfileInterface::class === $type || $type instanceof OrganizationProfileInterface || in_array(OrganizationProfileInterface::class, class_implements($type));
+ return OrganizationProfileInterface::class === $type || $type instanceof OrganizationProfileInterface || in_array(OrganizationProfileInterface::class, class_implements($type) ?: []);
}
}
diff --git a/src/Api/Monetization/Denormalizer/PrepaidBalanceDenormalizer.php b/src/Api/Monetization/Denormalizer/PrepaidBalanceDenormalizer.php
index 9c85a26cb..4b6ebe451 100644
--- a/src/Api/Monetization/Denormalizer/PrepaidBalanceDenormalizer.php
+++ b/src/Api/Monetization/Denormalizer/PrepaidBalanceDenormalizer.php
@@ -52,6 +52,6 @@ public function supportsDenormalization($data, $type, $format = null)
return false;
}
- return PrepaidBalanceInterface::class === $type || $type instanceof PrepaidBalanceInterface || in_array(PrepaidBalanceInterface::class, class_implements($type));
+ return PrepaidBalanceInterface::class === $type || $type instanceof PrepaidBalanceInterface || in_array(PrepaidBalanceInterface::class, class_implements($type) ?: []);
}
}
diff --git a/src/Api/Monetization/Denormalizer/RatePlanDenormalizer.php b/src/Api/Monetization/Denormalizer/RatePlanDenormalizer.php
index 0e570503e..f8aaace18 100644
--- a/src/Api/Monetization/Denormalizer/RatePlanDenormalizer.php
+++ b/src/Api/Monetization/Denormalizer/RatePlanDenormalizer.php
@@ -74,6 +74,6 @@ public function supportsDenormalization($data, $type, $format = null)
return false;
}
- return RatePlanInterface::class === $type || $type instanceof RatePlanInterface || in_array(RatePlanInterface::class, class_implements($type));
+ return RatePlanInterface::class === $type || $type instanceof RatePlanInterface || in_array(RatePlanInterface::class, class_implements($type) ?: []);
}
}
diff --git a/src/Api/Monetization/Denormalizer/RatePlanDenormalizerFactory.php b/src/Api/Monetization/Denormalizer/RatePlanDenormalizerFactory.php
index b425f999c..c528094e1 100644
--- a/src/Api/Monetization/Denormalizer/RatePlanDenormalizerFactory.php
+++ b/src/Api/Monetization/Denormalizer/RatePlanDenormalizerFactory.php
@@ -29,13 +29,13 @@ class RatePlanDenormalizerFactory implements DenormalizerInterface, SerializerAw
setSerializer as private traitSetSerializer;
}
- /** @var \Symfony\Component\Serializer\Normalizer\DenormalizerInterface[] */
+ /** @var DenormalizerInterface[] */
protected $denormalizers = [];
/**
* RatePlanDenormalizerFactory constructor.
*
- * @param \Symfony\Component\Serializer\Normalizer\DenormalizerInterface[] $denormalizers
+ * @param DenormalizerInterface[] $denormalizers
*/
public function __construct(array $denormalizers = [])
{
diff --git a/src/Api/Monetization/Denormalizer/ReportDefinitionDenormalizer.php b/src/Api/Monetization/Denormalizer/ReportDefinitionDenormalizer.php
index a37f8cc9b..1c9e97088 100644
--- a/src/Api/Monetization/Denormalizer/ReportDefinitionDenormalizer.php
+++ b/src/Api/Monetization/Denormalizer/ReportDefinitionDenormalizer.php
@@ -52,6 +52,6 @@ public function supportsDenormalization($data, $type, $format = null)
return false;
}
- return ReportDefinitionInterface::class === $type || $type instanceof ReportDefinitionInterface || in_array(ReportDefinitionInterface::class, class_implements($type));
+ return ReportDefinitionInterface::class === $type || $type instanceof ReportDefinitionInterface || in_array(ReportDefinitionInterface::class, class_implements($type) ?: []);
}
}
diff --git a/src/Api/Monetization/Denormalizer/SupportedCurrencyDenormalizer.php b/src/Api/Monetization/Denormalizer/SupportedCurrencyDenormalizer.php
index 37e7f2eb7..21616f8ea 100644
--- a/src/Api/Monetization/Denormalizer/SupportedCurrencyDenormalizer.php
+++ b/src/Api/Monetization/Denormalizer/SupportedCurrencyDenormalizer.php
@@ -52,6 +52,6 @@ public function supportsDenormalization($data, $type, $format = null)
return false;
}
- return SupportedCurrencyInterface::class === $type || $type instanceof SupportedCurrencyInterface || in_array(SupportedCurrencyInterface::class, class_implements($type));
+ return SupportedCurrencyInterface::class === $type || $type instanceof SupportedCurrencyInterface || in_array(SupportedCurrencyInterface::class, class_implements($type) ?: []);
}
}
diff --git a/src/Api/Monetization/Denormalizer/TermsAndConditionsDenormalizer.php b/src/Api/Monetization/Denormalizer/TermsAndConditionsDenormalizer.php
index 61efbe651..33eb48bba 100644
--- a/src/Api/Monetization/Denormalizer/TermsAndConditionsDenormalizer.php
+++ b/src/Api/Monetization/Denormalizer/TermsAndConditionsDenormalizer.php
@@ -71,6 +71,6 @@ public function supportsDenormalization($data, $type, $format = null)
return false;
}
- return TermsAndConditionsInterface::class === $type || $type instanceof TermsAndConditionsInterface || in_array(TermsAndConditionsInterface::class, class_implements($type));
+ return TermsAndConditionsInterface::class === $type || $type instanceof TermsAndConditionsInterface || in_array(TermsAndConditionsInterface::class, class_implements($type) ?: []);
}
}
diff --git a/src/Api/Monetization/Entity/Property/AddressesPropertyAwareTrait.php b/src/Api/Monetization/Entity/Property/AddressesPropertyAwareTrait.php
index 084f3aaf9..88562b7bb 100644
--- a/src/Api/Monetization/Entity/Property/AddressesPropertyAwareTrait.php
+++ b/src/Api/Monetization/Entity/Property/AddressesPropertyAwareTrait.php
@@ -27,13 +27,13 @@
*/
trait AddressesPropertyAwareTrait
{
- /** @var \Apigee\Edge\Api\Monetization\Structure\Address[] */
+ /** @var Address[] */
protected $addresses = [];
/**
* {@inheritdoc}
*
- * @return \Apigee\Edge\Api\Monetization\Structure\Address[]
+ * @return Address[]
*/
public function getAddresses(): array
{
diff --git a/src/Api/Monetization/Entity/Property/AddressesPropertyInterface.php b/src/Api/Monetization/Entity/Property/AddressesPropertyInterface.php
index 948858569..643a729db 100644
--- a/src/Api/Monetization/Entity/Property/AddressesPropertyInterface.php
+++ b/src/Api/Monetization/Entity/Property/AddressesPropertyInterface.php
@@ -23,7 +23,7 @@
interface AddressesPropertyInterface
{
/**
- * @return \Apigee\Edge\Api\Monetization\Structure\Address[]
+ * @return Address[]
*/
public function getAddresses(): array;
diff --git a/src/Api/Monetization/Entity/Property/ApiProductsPropertyAwareTrait.php b/src/Api/Monetization/Entity/Property/ApiProductsPropertyAwareTrait.php
index 788498c0b..4d6c0e651 100644
--- a/src/Api/Monetization/Entity/Property/ApiProductsPropertyAwareTrait.php
+++ b/src/Api/Monetization/Entity/Property/ApiProductsPropertyAwareTrait.php
@@ -33,7 +33,7 @@ trait ApiProductsPropertyAwareTrait
/**
* {@inheritdoc}
*
- * @return \Apigee\Edge\Api\Monetization\Entity\ApiProductInterface[]
+ * @return ApiProductInterface[]
*/
public function getApiProducts(): array
{
diff --git a/src/Api/Monetization/Entity/RatePlan.php b/src/Api/Monetization/Entity/RatePlan.php
index d69328875..e1e9badb8 100644
--- a/src/Api/Monetization/Entity/RatePlan.php
+++ b/src/Api/Monetization/Entity/RatePlan.php
@@ -86,7 +86,7 @@ abstract class RatePlan extends OrganizationAwareEntity implements RatePlanInter
/** @var bool */
protected $published = false;
- /** @var \Apigee\Edge\Api\Monetization\Structure\RatePlanDetail[] */
+ /** @var RatePlanDetail[] */
protected $ratePlanDetails = [];
/** @var float|null */
diff --git a/src/Api/Monetization/Entity/RatePlanInterface.php b/src/Api/Monetization/Entity/RatePlanInterface.php
index 7058c7b6e..054f3cada 100644
--- a/src/Api/Monetization/Entity/RatePlanInterface.php
+++ b/src/Api/Monetization/Entity/RatePlanInterface.php
@@ -160,7 +160,7 @@ public function isPublished(): bool;
public function setPublished(bool $published): void;
/**
- * @return \Apigee\Edge\Api\Monetization\Structure\RatePlanDetail[]
+ * @return RatePlanDetail[]
*/
public function getRatePlanDetails(): array;
diff --git a/src/Api/Monetization/Normalizer/EntityNormalizer.php b/src/Api/Monetization/Normalizer/EntityNormalizer.php
index cbae260c7..22ade87e6 100644
--- a/src/Api/Monetization/Normalizer/EntityNormalizer.php
+++ b/src/Api/Monetization/Normalizer/EntityNormalizer.php
@@ -127,7 +127,6 @@ protected function getNestedObjectProperties($object): array
$entityReferenceProperties = [];
$ro = new ReflectionObject($object);
foreach ($ro->getProperties() as $property) {
- $property->setAccessible(true);
$value = $property->getValue($object);
if (is_object($value) && $value instanceof NestedObjectReferenceInterface) {
if ($this->nameConverter) {
diff --git a/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php b/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php
index 0af7aff6b..7fb5fb298 100644
--- a/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php
+++ b/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php
@@ -29,13 +29,13 @@ class RatePlanNormalizerFactory implements NormalizerInterface, SerializerAwareI
setSerializer as private traitSetSerializer;
}
- /** @var \Symfony\Component\Serializer\Normalizer\NormalizerInterface[] */
+ /** @var NormalizerInterface[] */
protected $normalizers = [];
/**
* RatePlanDenormalizerFactory constructor.
*
- * @param \Symfony\Component\Serializer\Normalizer\NormalizerInterface[] $normalizers
+ * @param NormalizerInterface[] $normalizers
*/
public function __construct(array $normalizers = [])
{
diff --git a/src/Api/Monetization/Structure/RatePlanDetail.php b/src/Api/Monetization/Structure/RatePlanDetail.php
index 7c001bd89..c3fc9473b 100644
--- a/src/Api/Monetization/Structure/RatePlanDetail.php
+++ b/src/Api/Monetization/Structure/RatePlanDetail.php
@@ -103,7 +103,7 @@ final class RatePlanDetail extends BaseObject implements
/** @var string */
private $meteringType;
- /** @var \Apigee\Edge\Api\Monetization\Structure\RatePlanRate[] */
+ /** @var RatePlanRate[] */
private $ratePlanRates = [];
/** @var string */
@@ -199,7 +199,7 @@ public function setMeteringType(string $meteringType): void
}
/**
- * @return \Apigee\Edge\Api\Monetization\Structure\RatePlanRate[]
+ * @return RatePlanRate[]
*/
public function getRatePlanRates(): array
{
diff --git a/src/Api/Monetization/Utility/TimezoneFixerHelperTrait.php b/src/Api/Monetization/Utility/TimezoneFixerHelperTrait.php
index 5fdc04e80..e89620cdb 100644
--- a/src/Api/Monetization/Utility/TimezoneFixerHelperTrait.php
+++ b/src/Api/Monetization/Utility/TimezoneFixerHelperTrait.php
@@ -51,7 +51,6 @@ protected function fixTimeZoneOnNormalization($object, $normalized, DateTimeZone
$ro = new ReflectionObject($object);
$dateDenormalizer = new DateTimeNormalizer([DateTimeNormalizer::FORMAT_KEY => EntityInterface::DATE_FORMAT, DateTimeNormalizer::TIMEZONE_KEY => $orgTimezone]);
foreach ($ro->getProperties() as $property) {
- $property->setAccessible(true);
$value = $property->getValue($object);
if ($value instanceof DateTimeImmutable) {
$normalized->{$property->getName()} = $dateDenormalizer->normalize($value, DateTimeImmutable::class);
@@ -86,7 +85,6 @@ protected function fixTimeZoneOnDenormalization($object, $denormalized, DateTime
foreach ($object as $prop_name => $prop_value) {
if ($ro->hasProperty($prop_name)) {
$property = $ro->getProperty($prop_name);
- $property->setAccessible(true);
$value = $property->getValue($denormalized);
if ($value instanceof DateTimeImmutable) {
$property->setValue($denormalized, $dateDenormalizer->denormalize($prop_value, DateTimeImmutable::class));
diff --git a/src/Controller/PaginationHelperTrait.php b/src/Controller/PaginationHelperTrait.php
index 4ceccf8d2..1f1fb090e 100644
--- a/src/Controller/PaginationHelperTrait.php
+++ b/src/Controller/PaginationHelperTrait.php
@@ -111,11 +111,10 @@ protected function listEntities(?PagerInterface $pager = null, array $query_para
if (OrganizationFeatures::isPaginationAvailable($organization)) {
return $this->listEntitiesWithCps($pager, $query_params, $key_provider);
- } else {
- $this->triggerCpsSimulationNotice($pager);
-
- return $this->listEntitiesWithoutCps($pager, $query_params, $key_provider);
}
+ $this->triggerCpsSimulationNotice($pager);
+
+ return $this->listEntitiesWithoutCps($pager, $query_params, $key_provider);
}
/**
@@ -136,11 +135,10 @@ protected function listEntityIds(?PagerInterface $pager = null, array $query_par
if (OrganizationFeatures::isCpsEnabled($organization)) {
return $this->listEntityIdsWithCps($pager, $query_params);
- } else {
- $this->triggerCpsSimulationNotice($pager);
-
- return $this->listEntityIdsWithoutCps($pager, $query_params);
}
+ $this->triggerCpsSimulationNotice($pager);
+
+ return $this->listEntityIdsWithoutCps($pager, $query_params);
}
/**
@@ -178,46 +176,45 @@ private function listEntitiesWithCps(?PagerInterface $pager = null, array $query
$responseArray = $this->getResultsInRange($pager, $query_params);
// Ignore entity type key from response, ex.: developer,
// apiproduct, etc.
- $responseArray = reset($responseArray);
+ $responseArray = reset($responseArray) ?: [];
return $this->responseArrayToArrayOfEntities($responseArray, $key_provider);
- } else {
- // Pass an empty pager to load all entities.
- $responseArray = $this->getResultsInRange($this->createPager(), $query_params);
- // Ignore entity type key from response, ex.: developer, apiproduct,
- // etc.
- $responseArray = reset($responseArray);
- if (empty($responseArray)) {
- return [];
- }
- $entities = $this->responseArrayToArrayOfEntities($responseArray, $key_provider);
- $lastEntity = end($entities);
- $lastId = $lastEntity->{$key_provider}();
- do {
- $tmp = $this->getResultsInRange($this->createPager(0, $lastId), $query_params);
- // Ignore entity type key from response, ex.: developer,
- // apiproduct, etc.
- $tmp = reset($tmp);
- // Remove the first item from the list because it is the same
- // as the last item of $entities at this moment.
- // Apigee Edge response always starts with the requested entity
- // (startKey).
- array_shift($tmp);
- $tmpEntities = $this->responseArrayToArrayOfEntities((array) $tmp, $key_provider);
-
- if (count($tmpEntities) > 0) {
- // The returned entity array is keyed by entity id which
- // is unique so we can do this.
- $entities += $tmpEntities;
- $lastEntity = end($tmpEntities);
- $lastId = $lastEntity->{$key_provider}();
- } else {
- $lastId = false;
- }
- } while ($lastId);
-
- return $entities;
}
+ // Pass an empty pager to load all entities.
+ $responseArray = $this->getResultsInRange($this->createPager(), $query_params);
+ // Ignore entity type key from response, ex.: developer, apiproduct,
+ // etc.
+ $responseArray = reset($responseArray) ?: [];
+ if (empty($responseArray)) {
+ return [];
+ }
+ $entities = $this->responseArrayToArrayOfEntities($responseArray, $key_provider);
+ $lastEntity = end($entities);
+ $lastId = $lastEntity->{$key_provider}();
+ do {
+ $tmp = $this->getResultsInRange($this->createPager(0, $lastId), $query_params);
+ // Ignore entity type key from response, ex.: developer,
+ // apiproduct, etc.
+ $tmp = reset($tmp) ?: [];
+ // Remove the first item from the list because it is the same
+ // as the last item of $entities at this moment.
+ // Apigee Edge response always starts with the requested entity
+ // (startKey).
+ array_shift($tmp);
+ $tmpEntities = $this->responseArrayToArrayOfEntities((array) $tmp, $key_provider);
+
+ if (count($tmpEntities) > 0) {
+ // The returned entity array is keyed by entity id which
+ // is unique so we can do this.
+ $entities += $tmpEntities;
+ $lastEntity = end($tmpEntities);
+ $lastId = $lastEntity->{$key_provider}();
+ } else {
+ $lastId = false;
+ }
+ } while ($lastId);
+
+ return $entities;
}
/**
@@ -245,7 +242,7 @@ private function listEntitiesWithoutCps(?PagerInterface $pager = null, array $qu
$response = $this->getClient()->get($uri);
$responseArray = $this->responseToArray($response);
// Ignore entity type key from response, ex.: apiProduct.
- $responseArray = reset($responseArray);
+ $responseArray = reset($responseArray) ?: [];
$entities = $this->responseArrayToArrayOfEntities($responseArray, $key_provider);
@@ -322,30 +319,29 @@ private function listEntityIdsWithCps(?PagerInterface $pager = null, array $quer
$expandCompatibility = str_ends_with($this->getClient()->getEndpoint(), $baseDomain);
if ($pager) {
return $this->getResultsInRange($pager, $query_params, $expandCompatibility);
- } else {
- $ids = $this->getResultsInRange($this->createPager(), $query_params, $expandCompatibility);
- if (empty($ids)) {
- return [];
- }
- $lastId = end($ids);
- do {
- $tmp = $this->getResultsInRange($this->createPager(0, $lastId), $query_params, $expandCompatibility);
- // Remove the first item from the list because it is the same
- // as the current last item of $ids.
- // Apigee Edge response always starts with the requested entity
- // id (startKey).
- array_shift($tmp);
-
- if (count($tmp) > 0) {
- $ids = array_merge($ids, $tmp);
- $lastId = end($tmp);
- } else {
- $lastId = false;
- }
- } while ($lastId);
-
- return $ids;
}
+ $ids = $this->getResultsInRange($this->createPager(), $query_params, $expandCompatibility);
+ if (empty($ids)) {
+ return [];
+ }
+ $lastId = end($ids);
+ do {
+ $tmp = $this->getResultsInRange($this->createPager(0, $lastId), $query_params, $expandCompatibility);
+ // Remove the first item from the list because it is the same
+ // as the current last item of $ids.
+ // Apigee Edge response always starts with the requested entity
+ // id (startKey).
+ array_shift($tmp);
+
+ if (count($tmp) > 0) {
+ $ids = array_merge($ids, $tmp);
+ $lastId = end($tmp);
+ } else {
+ $lastId = false;
+ }
+ } while ($lastId);
+
+ return $ids;
}
/**
@@ -394,7 +390,7 @@ private function simulateCpsPagination(PagerInterface $pager, array $result, ?ar
$array_search_haystack = $array_search_haystack ?? $result;
// If start key is null let's set it to the first key in the
// result just like the API would do.
- $start_key = $pager->getStartKey() ?? reset($array_search_haystack);
+ $start_key = $pager->getStartKey() ?? (reset($array_search_haystack) ?: '');
$offset = array_search($start_key, $array_search_haystack);
// Start key has not been found in the response. Apigee Edge with
// CPS enabled would return an HTTP 404, with error code
diff --git a/src/Denormalizer/CredentialProductDenormalizer.php b/src/Denormalizer/CredentialProductDenormalizer.php
index 43cd89de2..03816a0bf 100644
--- a/src/Denormalizer/CredentialProductDenormalizer.php
+++ b/src/Denormalizer/CredentialProductDenormalizer.php
@@ -37,7 +37,7 @@ public function supportsDenormalization($data, $type, $format = null)
return false;
}
- return CredentialProductInterface::class === $type || $type instanceof CredentialProductInterface || in_array(CredentialProductInterface::class, class_implements($type));
+ return CredentialProductInterface::class === $type || $type instanceof CredentialProductInterface || in_array(CredentialProductInterface::class, class_implements($type) ?: []);
}
/**
diff --git a/src/Denormalizer/KeyValueMapDenormalizer.php b/src/Denormalizer/KeyValueMapDenormalizer.php
index cdc0027f4..0118f67f0 100644
--- a/src/Denormalizer/KeyValueMapDenormalizer.php
+++ b/src/Denormalizer/KeyValueMapDenormalizer.php
@@ -44,7 +44,7 @@ public function supportsDenormalization($data, $type, $format = null)
return false;
}
- return KeyValueMapInterface::class === $type || $type instanceof KeyValueMapInterface || in_array(KeyValueMapInterface::class, class_implements($type));
+ return KeyValueMapInterface::class === $type || $type instanceof KeyValueMapInterface || in_array(KeyValueMapInterface::class, class_implements($type) ?: []);
}
/**
diff --git a/src/HttpClient/Utility/Builder.php b/src/HttpClient/Utility/Builder.php
index f7f3991d2..0957851e8 100644
--- a/src/HttpClient/Utility/Builder.php
+++ b/src/HttpClient/Utility/Builder.php
@@ -45,7 +45,7 @@ class Builder implements BuilderInterface
/**
* Http client plugins.
*
- * @var \Http\Client\Common\Plugin[]
+ * @var Plugin[]
*/
private $plugins = [];
@@ -168,12 +168,10 @@ public function clearPlugins(): void
* Set or remove rebuild flag from the client.
*
* @param bool $rebuild
- *
- * @return bool
*/
- private function needsRebuild(bool $rebuild = true): bool
+ private function needsRebuild(bool $rebuild = true): void
{
- return $this->rebuild = $rebuild;
+ $this->rebuild = $rebuild;
}
/**
diff --git a/src/PropertyAccess/PropertyAccessorDecorator.php b/src/PropertyAccess/PropertyAccessorDecorator.php
index e47653fa6..6f938330f 100644
--- a/src/PropertyAccess/PropertyAccessorDecorator.php
+++ b/src/PropertyAccess/PropertyAccessorDecorator.php
@@ -154,7 +154,6 @@ private static function processTypeErrorOnGetValue($object, string $property, Ty
if (false !== $pos) {
$ro = new ReflectionObject($object);
$rp = $ro->getProperty($property);
- $rp->setAccessible(true);
$pos += strlen($delim);
$actualValue = $rp->getValue($object);
$expectedType = substr($error->getMessage(), $pos, (int) strpos($error->getMessage(), ',', $pos) - $pos);
diff --git a/src/Structure/KeyValueMapInterface.php b/src/Structure/KeyValueMapInterface.php
index e5ee22dc1..e6f6c1685 100644
--- a/src/Structure/KeyValueMapInterface.php
+++ b/src/Structure/KeyValueMapInterface.php
@@ -23,7 +23,7 @@
/**
* Interface KeyValueMapInterface.
*
- * @extends \IteratorAggregate
+ * @extends IteratorAggregate
*/
interface KeyValueMapInterface extends IteratorAggregate
{
diff --git a/src/Structure/ObjectCopyHelperTrait.php b/src/Structure/ObjectCopyHelperTrait.php
index 2958e8622..6f60cbc8e 100644
--- a/src/Structure/ObjectCopyHelperTrait.php
+++ b/src/Structure/ObjectCopyHelperTrait.php
@@ -31,7 +31,6 @@ public function __clone()
{
$ro = new ReflectionObject($this);
foreach ($ro->getProperties() as $property) {
- $property->setAccessible(true);
$value = $property->getValue($this);
if (is_object($value)) {
$property->setValue($this, clone $value);
diff --git a/tests/Api/ApigeeX/Controller/PaginatedEntityListingControllerTestTraitBase.php b/tests/Api/ApigeeX/Controller/PaginatedEntityListingControllerTestTraitBase.php
index 6e025ff37..aa70e8c5f 100644
--- a/tests/Api/ApigeeX/Controller/PaginatedEntityListingControllerTestTraitBase.php
+++ b/tests/Api/ApigeeX/Controller/PaginatedEntityListingControllerTestTraitBase.php
@@ -33,7 +33,7 @@ trait PaginatedEntityListingControllerTestTraitBase
* @param string $entityIdPrefix
* Random entity id prefix for this test.
*
- * @return \Apigee\Edge\Entity\EntityInterface[]
+ * @return EntityInterface[]
*/
protected function setupForPaginatedEntityListingTest(string $entityIdPrefix): array
{
diff --git a/tests/Api/ApigeeX/Controller/PrepaidBalanceControllerTestBase.php b/tests/Api/ApigeeX/Controller/PrepaidBalanceControllerTestBase.php
index 9689119e6..8fadfbcfc 100644
--- a/tests/Api/ApigeeX/Controller/PrepaidBalanceControllerTestBase.php
+++ b/tests/Api/ApigeeX/Controller/PrepaidBalanceControllerTestBase.php
@@ -90,10 +90,8 @@ public function testGetPrepaidBalance(): void
// We need to prepaid balance serializer from the controller.
$ro = new ReflectionObject(static::entityController());
$property = $ro->getProperty('decorated');
- $property->setAccessible(true);
$ro = new ReflectionObject($property->getValue(static::entityController()));
$rp = $ro->getProperty('prepaidBalanceSerializer');
- $rp->setAccessible(true);
$validator = new PrepaidBalanceSerializerValidator($rp->getValue($property->getValue(static::entityController())));
foreach ($entities as $entity) {
diff --git a/tests/Api/Management/Controller/PaginatedEntityIdListingControllerTestTrait.php b/tests/Api/Management/Controller/PaginatedEntityIdListingControllerTestTrait.php
index 45dd8c0b9..02689fad1 100644
--- a/tests/Api/Management/Controller/PaginatedEntityIdListingControllerTestTrait.php
+++ b/tests/Api/Management/Controller/PaginatedEntityIdListingControllerTestTrait.php
@@ -44,7 +44,7 @@ public function testPaginatedEntityIdListing(): void
$entityIds = $this->controllerForPaginatedEntityIdListing()->getEntityIds();
}
- /** @var \Apigee\Edge\Entity\EntityInterface[] $tmp */
+ /** @var EntityInterface[] $tmp */
$tmp = $entityIds;
// Get the 4th item from the list.
array_shift($tmp);
diff --git a/tests/Api/Management/Controller/PaginatedEntityListingControllerTestTraitBase.php b/tests/Api/Management/Controller/PaginatedEntityListingControllerTestTraitBase.php
index c96afa173..d9a2b98cc 100644
--- a/tests/Api/Management/Controller/PaginatedEntityListingControllerTestTraitBase.php
+++ b/tests/Api/Management/Controller/PaginatedEntityListingControllerTestTraitBase.php
@@ -33,7 +33,7 @@ trait PaginatedEntityListingControllerTestTraitBase
* @param string $entityIdPrefix
* Random entity id prefix for this test.
*
- * @return \Apigee\Edge\Entity\EntityInterface[]
+ * @return EntityInterface[]
*/
protected function setupForPaginatedEntityListingTest(string $entityIdPrefix): array
{
diff --git a/tests/Api/Monetization/Controller/LegalEntityTermsAndConditionsControllerTestBase.php b/tests/Api/Monetization/Controller/LegalEntityTermsAndConditionsControllerTestBase.php
index f45dda1a6..c0e655d16 100644
--- a/tests/Api/Monetization/Controller/LegalEntityTermsAndConditionsControllerTestBase.php
+++ b/tests/Api/Monetization/Controller/LegalEntityTermsAndConditionsControllerTestBase.php
@@ -38,7 +38,7 @@ public function testGetTermsAndConditionsHistory(): void
{
/** @var \Apigee\Edge\Api\Monetization\Controller\LegalEntityTermsAndConditionsControllerInterface $controller */
$controller = static::entityController();
- /** @var \Apigee\Edge\Api\Monetization\Structure\LegalEntityTermsAndConditionsHistoryItem[] $entities */
+ /** @var LegalEntityTermsAndConditionsHistoryItem[] $entities */
$entities = $controller->getTermsAndConditionsHistory();
$json = json_decode((string) static::defaultAPIClient()->getJournal()->getLastResponse()->getBody());
$json = reset($json);
diff --git a/tests/Api/Monetization/Controller/PrepaidBalanceControllerTestBase.php b/tests/Api/Monetization/Controller/PrepaidBalanceControllerTestBase.php
index 0cf1aa440..58bde1029 100644
--- a/tests/Api/Monetization/Controller/PrepaidBalanceControllerTestBase.php
+++ b/tests/Api/Monetization/Controller/PrepaidBalanceControllerTestBase.php
@@ -105,10 +105,8 @@ public function testGetPrepaidBalance(): void
// We need to prepaid balance serializer from the controller.
$ro = new ReflectionObject(static::entityController());
$property = $ro->getProperty('decorated');
- $property->setAccessible(true);
$ro = new ReflectionObject($property->getValue(static::entityController()));
$rp = $ro->getProperty('prepaidBalanceSerializer');
- $rp->setAccessible(true);
$validator = new PrepaidBalanceSerializerValidator($rp->getValue($property->getValue(static::entityController())));
foreach ($entities as $entity) {
$validator->validate($json[$i], $entity);
diff --git a/tests/Api/Monetization/Controller/TimezoneConversionTestTrait.php b/tests/Api/Monetization/Controller/TimezoneConversionTestTrait.php
index 431dabc81..aefeaf5a4 100644
--- a/tests/Api/Monetization/Controller/TimezoneConversionTestTrait.php
+++ b/tests/Api/Monetization/Controller/TimezoneConversionTestTrait.php
@@ -111,7 +111,6 @@ private function getDateProperties(EntityInterface $entity): array
$ro = new ReflectionObject($entity);
foreach ($ro->getProperties() as $property) {
- $property->setAccessible(true);
$value = $property->getValue($entity);
if ($value instanceof DateTimeInterface) {
$properties[] = $property->getName();
diff --git a/tests/Api/Monetization/EntitySerializer/PropertyValidator/PaymentTransactionPropertyValidator.php b/tests/Api/Monetization/EntitySerializer/PropertyValidator/PaymentTransactionPropertyValidator.php
index bff7b681e..0d6749527 100644
--- a/tests/Api/Monetization/EntitySerializer/PropertyValidator/PaymentTransactionPropertyValidator.php
+++ b/tests/Api/Monetization/EntitySerializer/PropertyValidator/PaymentTransactionPropertyValidator.php
@@ -84,7 +84,6 @@ public function validate(stdClass $input, stdClass $output, EntityInterface $ent
unset($expected->organization);
$ro = new ReflectionObject($lentity);
$orgProp = $ro->getProperty('organization');
- $orgProp->setAccessible(true);
// Only way to clear organization.
$orgProp->setValue($lentity, null);
// These properties are missing (not returned by Apigee Edge) on a
diff --git a/tests/PropertyAccess/PropertyAccessorDecoratorTest.php b/tests/PropertyAccess/PropertyAccessorDecoratorTest.php
index 205df29aa..910e39064 100644
--- a/tests/PropertyAccess/PropertyAccessorDecoratorTest.php
+++ b/tests/PropertyAccess/PropertyAccessorDecoratorTest.php
@@ -31,6 +31,10 @@
use Symfony\Component\PropertyAccess\Tests\PropertyAccessorTest;
use TypeError;
+if (!class_exists(PropertyAccessorTest::class)) {
+ return;
+}
+
class PropertyAccessorDecoratorTest extends PropertyAccessorTest
{
use PhpUnitBcBridgeTrait;
@@ -124,7 +128,6 @@ protected function setUp(): void
// class.
$ro = new ReflectionClass(PropertyAccessorTest::class);
$property = $ro->getProperty('propertyAccessor');
- $property->setAccessible(true);
$property->setValue($this, $this->propertyAccessor);
}
@@ -193,12 +196,12 @@ public function exceptionsToGetOnGetValue(): array
$shouldBeAString,
['shouldBeAString', UnexpectedValueException::class, '/Invalid value returned for shouldBeAString property on instance of class@anonymous.* class. Expected type "string", got "stdClass".$/'],
];
- } else {
- return [
- $shouldBeAString,
- ['shouldBeAString', TypeError::class, '/Return value must be of type string, stdClass returned/'],
- ];
}
+
+ return [
+ $shouldBeAString,
+ ['shouldBeAString', TypeError::class, '/Return value must be of type string, stdClass returned/'],
+ ];
}
public function exceptionsToGetOnSetValue(): array
@@ -208,10 +211,10 @@ public function exceptionsToGetOnSetValue(): array
return [
['shouldBeAStringArray', [null], InvalidArgumentException::class, '/^Expected argument of type "string", "null" given/'],
];
- } else {
- return [
- ['shouldBeAStringArray', [null], TypeError::class, '/Argument #1 must be of type string, null given/'],
- ];
}
+
+ return [
+ ['shouldBeAStringArray', [null], TypeError::class, '/Argument #1 must be of type string, null given/'],
+ ];
}
}
diff --git a/tests/Serializer/EntitySerializerTest.php b/tests/Serializer/EntitySerializerTest.php
index fad933293..0775cee85 100644
--- a/tests/Serializer/EntitySerializerTest.php
+++ b/tests/Serializer/EntitySerializerTest.php
@@ -174,9 +174,7 @@ public function testSetPropertiesFromResponseWithValidValues(): void
/** @var ReflectionProperty $originalProperty */
/** @var ReflectionProperty $entityProperty */
$originalProperty = $roOriginal->getProperty('propertyWithoutGetter');
- $originalProperty->setAccessible(true);
$entityProperty = $roEntity->getProperty('propertyWithoutGetter');
- $entityProperty->setAccessible(true);
$this->assertEquals($originalProperty->getValue($original), $entityProperty->getValue($entity));
// Ensure that value of a property that uses variable-length
diff --git a/tests/Test/Controller/EntityControllerTestBase.php b/tests/Test/Controller/EntityControllerTestBase.php
index a7f14d19d..e4e0ed302 100644
--- a/tests/Test/Controller/EntityControllerTestBase.php
+++ b/tests/Test/Controller/EntityControllerTestBase.php
@@ -66,10 +66,8 @@ protected function entitySerializer(): EntitySerializerInterface
// a controller.
$ro = new ReflectionObject(static::entityController());
$property = $ro->getProperty('decorated');
- $property->setAccessible(true);
$ro = new ReflectionObject($property->getValue(static::entityController()));
$rm = $ro->getMethod('getEntitySerializer');
- $rm->setAccessible(true);
static::$instance = $rm->invoke($property->getValue(static::entityController()));
}
diff --git a/tests/Test/Entity/MockEntity.php b/tests/Test/Entity/MockEntity.php
index e40f0c047..03b3ab7fe 100644
--- a/tests/Test/Entity/MockEntity.php
+++ b/tests/Test/Entity/MockEntity.php
@@ -65,7 +65,7 @@ class MockEntity extends Entity
/** @var string */
private $emptyString = '';
- /** @var \Apigee\Edge\Api\Management\Entity\AppCredential[] */
+ /** @var AppCredential[] */
private $appCredential = [];
/** @var CredentialProduct */
@@ -236,7 +236,7 @@ public function setCredentialProduct(CredentialProduct $credentialProduct): void
}
/**
- * @return \Apigee\Edge\Api\Management\Entity\AppCredential[]
+ * @return AppCredential[]
*/
public function getAppCredential(): array
{
@@ -244,7 +244,7 @@ public function getAppCredential(): array
}
/**
- * @param \Apigee\Edge\Api\Management\Entity\AppCredential[] $appCredential
+ * @param AppCredential[] $appCredential
*/
public function setAppCredential(array $appCredential): void
{
diff --git a/tests/Test/EntitySerializer/PropertyValidator/PropertyValidatorsAwareValidatorInterface.php b/tests/Test/EntitySerializer/PropertyValidator/PropertyValidatorsAwareValidatorInterface.php
index 2394d3068..c95d287c5 100644
--- a/tests/Test/EntitySerializer/PropertyValidator/PropertyValidatorsAwareValidatorInterface.php
+++ b/tests/Test/EntitySerializer/PropertyValidator/PropertyValidatorsAwareValidatorInterface.php
@@ -23,7 +23,7 @@ interface PropertyValidatorsAwareValidatorInterface
/**
* Set property validators.
*
- * @param \Apigee\Edge\Tests\Test\EntitySerializer\PropertyValidator\PropertyValidatorInterface[] $validators
+ * @param PropertyValidatorInterface[] $validators
*/
public function setPropertyValidators(array $validators): void;
}
diff --git a/tests/Test/EntitySerializer/PropertyValidator/PropertyValidatorsAwareValidatorTrait.php b/tests/Test/EntitySerializer/PropertyValidator/PropertyValidatorsAwareValidatorTrait.php
index 18f1a310b..6117048d3 100644
--- a/tests/Test/EntitySerializer/PropertyValidator/PropertyValidatorsAwareValidatorTrait.php
+++ b/tests/Test/EntitySerializer/PropertyValidator/PropertyValidatorsAwareValidatorTrait.php
@@ -30,11 +30,11 @@
*/
trait PropertyValidatorsAwareValidatorTrait
{
- /** @var \Apigee\Edge\Tests\Test\EntitySerializer\PropertyValidator\PropertyValidatorInterface[] */
+ /** @var PropertyValidatorInterface[] */
protected $propertyValidators = [];
/**
- * @param \Apigee\Edge\Tests\Test\EntitySerializer\PropertyValidator\PropertyValidatorInterface[] $propertyValidators
+ * @param PropertyValidatorInterface[] $propertyValidators
*/
public function setPropertyValidators(array $propertyValidators): void
{
diff --git a/tests/Test/TestClientFactory.php b/tests/Test/TestClientFactory.php
index 89a917928..f90e9c6ec 100644
--- a/tests/Test/TestClientFactory.php
+++ b/tests/Test/TestClientFactory.php
@@ -35,7 +35,7 @@
*/
class TestClientFactory
{
- /** @var \Apigee\Edge\ClientInterface[] */
+ /** @var ClientInterface[] */
private static $instances = [];
/**
diff --git a/tests/Test/Utility/EntityStorage.php b/tests/Test/Utility/EntityStorage.php
index 47c2c1ab4..8439cc35d 100644
--- a/tests/Test/Utility/EntityStorage.php
+++ b/tests/Test/Utility/EntityStorage.php
@@ -42,7 +42,7 @@ final class EntityStorage
/** @var object[] */
private static $controllers = [];
- /** @var \Apigee\Edge\Entity\EntityInterface[] */
+ /** @var EntityInterface[] */
private static $createdEntities = [];
/**
@@ -100,7 +100,7 @@ public function removeEntity(string $entityId, $controller): void
/**
* @param object $controller
*
- * @return \Apigee\Edge\Entity\EntityInterface[]
+ * @return EntityInterface[]
*/
public function getCreatedEntitiesByStorage($controller): array
{