Skip to content

Commit

Permalink
Removing option of empty array for CredentialProduct
Browse files Browse the repository at this point in the history
  • Loading branch information
kedarkhaire committed Jan 17, 2025
1 parent a549e1d commit b406340
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Api/Management/Entity/AppCredential.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ class AppCredential extends Entity implements AppCredentialInterface
use StatusPropertyAwareTrait;

/**
* Array of credential products or an empty array.
* Array of credential products.
*
* @var \Apigee\Edge\Structure\CredentialProduct[]|array
* @var \Apigee\Edge\Structure\CredentialProduct[]
*/
protected $apiProducts = [];

Expand Down
3 changes: 1 addition & 2 deletions tests/Serializer/EntitySerializerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ public function testDenormalize(mixed $normalized): void
// Set value of this nullable value to ensure that a special condition is triggered in the EntityDenormalizer.
$normalized->nullable = null;
/** @var MockEntity $object */
$mockEntity = new MockEntity();
$object = static::$serializer->denormalize($normalized, $mockEntity::class);
$object = static::$serializer->denormalize($normalized, MockEntity::class);
$this->assertTrue(true === $object->isBool());
$this->assertTrue(2 === $object->getInt());
$this->assertTrue(0 === $object->getZero());
Expand Down

0 comments on commit b406340

Please sign in to comment.