From c54a266f06fb85075ef2c018e7e37755c5e546dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dezs=C5=91=20Bicz=C3=B3?= Date: Wed, 21 Nov 2018 11:50:31 +0100 Subject: [PATCH 1/4] Do not wrap constructor parameters. --- src/Api/Management/Controller/DeveloperController.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Api/Management/Controller/DeveloperController.php b/src/Api/Management/Controller/DeveloperController.php index 83c807eb..3dc4e620 100644 --- a/src/Api/Management/Controller/DeveloperController.php +++ b/src/Api/Management/Controller/DeveloperController.php @@ -57,12 +57,8 @@ class DeveloperController extends PaginatedEntityController implements Developer * @param \Apigee\Edge\Serializer\EntitySerializerInterface|null $entitySerializer * @param OrganizationControllerInterface|null $organizationController */ - public function __construct( - string $organization, - ClientInterface $client, - ?EntitySerializerInterface $entitySerializer = null, - ?OrganizationControllerInterface $organizationController = null - ) { + public function __construct(string $organization, ClientInterface $client, ?EntitySerializerInterface $entitySerializer = null, ?OrganizationControllerInterface $organizationController = null) + { $entitySerializer = $entitySerializer ?? new DeveloperSerializer(); parent::__construct($organization, $client, $entitySerializer, $organizationController); } From 2ae1f34e71dc3ee71e4bbbc623371a1184a7bc84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dezs=C5=91=20Bicz=C3=B3?= Date: Wed, 21 Nov 2018 11:51:00 +0100 Subject: [PATCH 2/4] Added missing organization controller parameter. --- src/Api/Management/Controller/CompanyController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Api/Management/Controller/CompanyController.php b/src/Api/Management/Controller/CompanyController.php index ef2ec549..ccff87dc 100644 --- a/src/Api/Management/Controller/CompanyController.php +++ b/src/Api/Management/Controller/CompanyController.php @@ -50,11 +50,12 @@ class CompanyController extends PaginatedEntityController implements CompanyCont * @param string $organization * @param \Apigee\Edge\ClientInterface $client * @param \Apigee\Edge\Serializer\EntitySerializerInterface|null $entitySerializer + * @param \Apigee\Edge\Api\Management\Controller\OrganizationControllerInterface|null $organizationController */ - public function __construct(string $organization, ClientInterface $client, ?EntitySerializerInterface $entitySerializer = null) + public function __construct(string $organization, ClientInterface $client, ?EntitySerializerInterface $entitySerializer = null, ?OrganizationControllerInterface $organizationController = null) { $entitySerializer = $entitySerializer ?? new CompanySerializer(); - parent::__construct($organization, $client, $entitySerializer); + parent::__construct($organization, $client, $entitySerializer, $organizationController); } /** From dc529b0e372352834711ea8e05304ba93091862f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dezs=C5=91=20Bicz=C3=B3?= Date: Wed, 21 Nov 2018 12:02:38 +0100 Subject: [PATCH 3/4] Added missing method description. --- .../StatusAwareEntityControllerInterface.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Controller/StatusAwareEntityControllerInterface.php b/src/Controller/StatusAwareEntityControllerInterface.php index e8752cbd..350cda7c 100644 --- a/src/Controller/StatusAwareEntityControllerInterface.php +++ b/src/Controller/StatusAwareEntityControllerInterface.php @@ -21,8 +21,9 @@ /** * Interface StatusAwareEntityControllerInterface. * - * Entity controller for those entities that has "status" property and the value of that property (and with that the - * status of the entity itself) can be changed only with an additional API call. + * Entity controller for those entities that has "status" property and the value + * of that property (and with that the status of the entity itself) can be + * changed only with an additional API call. * * @see https://docs.apigee.com/management/apis/post/organizations/%7Borg_name%7D/developers/%7Bdeveloper_email_or_id%7D * @see https://docs.apigee.com/management/apis/post/organizations/%7Borg_name%7D/developers/%7Bdeveloper_email_or_id%7D/apps/%7Bapp_name%7D @@ -30,5 +31,13 @@ */ interface StatusAwareEntityControllerInterface { + /** + * Changes the status of an entity in Apigee Edge. + * + * @param string $entityId + * Id of an entity. + * @param string $status + * New status to be set. + */ public function setStatus(string $entityId, string $status): void; } From 612da6085d7595d728e30fa7c476cd8f5cdc1346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dezs=C5=91=20Bicz=C3=B3?= Date: Wed, 21 Nov 2018 14:15:45 +0100 Subject: [PATCH 4/4] More clarification about how the underlying API endpoint is working. --- .../Controller/CompanyMembersControllerInterface.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Api/Management/Controller/CompanyMembersControllerInterface.php b/src/Api/Management/Controller/CompanyMembersControllerInterface.php index 88509cbb..983f1f37 100644 --- a/src/Api/Management/Controller/CompanyMembersControllerInterface.php +++ b/src/Api/Management/Controller/CompanyMembersControllerInterface.php @@ -38,19 +38,17 @@ public function getMembers(): CompanyMembership; /** * Set (add/update/remove) members of a company. * - * Warning! If you pass en empty membership object you remove all developers + * WARNING! If you pass en empty membership object you remove all developers * from the company. * - * The return array only contains the changes, it does not contain all - * members. Use getMembers() to retrieve it. - * * @param \Apigee\Edge\Api\Management\Structure\CompanyMembership $members - * Array of developers with their optional roles in the company. + * Membership object with the changes to be applied. * * @return \Apigee\Edge\Api\Management\Structure\CompanyMembership - * Array of developers with their optional roles in the company. + * Membership object with the applied changes, it does not contain all + * members. Use getMembers() to retrieve them. */ - public function setMembers(CompanyMembership $members): CompanyMembership; + public function setMembers(CompanyMembership $members); /** * Removes a developer from a company.