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

Fixes for new PHPCS changes #403

Merged
merged 2 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"require-dev": {
"dms/phpunit-arraysubset-asserts": "^0.4.0",
"friendsofphp/php-cs-fixer": "^3.22",
"friendsofphp/php-cs-fixer": "^3.68",
"fzaninotto/faker": "^1.7",
"guzzlehttp/psr7": "^2.5",
"league/flysystem": "^1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Api/ApigeeX/Controller/AcceptedRatePlanController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/Api/ApigeeX/Controller/AppControllerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion src/Api/ApigeeX/Controller/PrepaidBalanceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
4 changes: 2 additions & 2 deletions src/Api/ApigeeX/Denormalizer/RatePlanDenormalizerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [])
{
Expand Down
8 changes: 4 additions & 4 deletions src/Api/ApigeeX/Entity/RatePlan.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];

/**
Expand Down
8 changes: 4 additions & 4 deletions src/Api/ApigeeX/Entity/RatePlanInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;

Expand All @@ -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;

Expand All @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [])
{
Expand Down
4 changes: 2 additions & 2 deletions src/Api/Management/Controller/AppControllerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Management/Entity/AppInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function normalize($object, $format = null, array $context = []): array|s
$normalized['developer'][] = (object) ['email' => $member, 'role' => $role];
}

// convert to ArrayObject as symfony normalizer throws error for std object.
// convert to \ArrayObject as symfony normalizer throws error for std object.
// set ARRAY_AS_PROPS flag as we need entries to be accessed as properties.
return new \ArrayObject($normalized, \ArrayObject::ARRAY_AS_PROPS);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [])
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
interface AddressesPropertyInterface
{
/**
* @return \Apigee\Edge\Api\Monetization\Structure\Address[]
* @return Address[]
*/
public function getAddresses(): array;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ trait ApiProductsPropertyAwareTrait
/**
* {@inheritdoc}
*
* @return \Apigee\Edge\Api\Monetization\Entity\ApiProductInterface[]
* @return ApiProductInterface[]
*/
public function getApiProducts(): array
{
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Monetization/Entity/RatePlan.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Monetization/Entity/RatePlanInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [])
{
Expand Down
4 changes: 2 additions & 2 deletions src/Api/Monetization/Structure/RatePlanDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -199,7 +199,7 @@ public function setMeteringType(string $meteringType): void
}

/**
* @return \Apigee\Edge\Api\Monetization\Structure\RatePlanRate[]
* @return RatePlanRate[]
*/
public function getRatePlanRates(): array
{
Expand Down
2 changes: 1 addition & 1 deletion src/HttpClient/Utility/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Builder implements BuilderInterface
/**
* Http client plugins.
*
* @var \Http\Client\Common\Plugin[]
* @var Plugin[]
*/
private $plugins = [];

Expand Down
2 changes: 1 addition & 1 deletion src/Normalizer/CredentialProductNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function normalize($object, $format = null, array $context = []): array|s
'status' => $object->getStatus(),
];

// Need to convert to ArrayObject as symfony normalizer throws error for std object.
// Need to convert to \ArrayObject as symfony normalizer throws error for std object.
// Need to set ARRAY_AS_PROPS flag as we need Entries to be accessed as properties.
return new \ArrayObject($asObject, \ArrayObject::ARRAY_AS_PROPS);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Normalizer/PropertiesPropertyNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function normalize($object, $format = null, array $context = []): array|s
'property' => parent::normalize($object, $format, $context),
];

// convert to ArrayObject as symfony normalizer throws error for std object.
// convert to \ArrayObject as symfony normalizer throws error for std object.
// set ARRAY_AS_PROPS flag as we need entries to be accessed as properties.
return new \ArrayObject($return, \ArrayObject::ARRAY_AS_PROPS);
}
Expand Down
1 change: 0 additions & 1 deletion src/Serializer/EntitySerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
use Apigee\Edge\Normalizer\EdgeDateNormalizer;
use Apigee\Edge\Normalizer\KeyValueMapNormalizer;
use Apigee\Edge\Normalizer\ObjectNormalizer;
use Apigee\Edge\Serializer\JsonDecode;
use Psr\Http\Message\ResponseInterface;
use ReflectionMethod;
use ReflectionObject;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Loading
Loading