Skip to content

Commit

Permalink
docs: Fix variable names in README.md (#51)
Browse files Browse the repository at this point in the history
Signed-off-by: Oğuzhan Durgun <[email protected]>
  • Loading branch information
oguzhand95 authored Aug 7, 2023
1 parent cbe5c16 commit a46c028
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ $request = CheckResourcesRequest::newInstance()
->withAttribute("owner", AttributeValue::stringValue("john"))
)

$checkResourcesResult = $client->checkResources($request);
$resultEntry = $checkResourcesResult->find("xx125");
$checkResourcesResponse = $client->checkResources($request);
$resultEntry = $checkResourcesResponse->find("xx125");

if ($resultEntry->isAllowed("view:public")) { // returns true if `view:public` action is allowed
// ...
Expand Down Expand Up @@ -88,14 +88,14 @@ $request = CheckResourcesRequest::newInstance()
)
)

$checkResourcesResult = $client->checkResources($request);
$checkResourcesResponse = $client->checkResources($request);

$resultEntry = $checkResourcesResult->find("xx125");
$resultEntry = $checkResourcesResponse->find("xx125");
if ($resultEntry->isAllowed("approve")) { // returns true if `approve` action is allowed
// ...
}

$resultEntry = $checkResourcesResult->find("xx225");
$resultEntry = $checkResourcesResponse->find("xx225");
if ($resultEntry->isAllowed("defer")) { // returns true if `defer` action is allowed
// ...
}
Expand All @@ -119,11 +119,11 @@ $request = PlanResourcesRequest::newInstance()
->withPolicyVersion("20210210")
);

$planResourcesResult = $this->client->planResources($request);
if ($planResourcesResult->isAlwaysAllowed()) {
$planResourcesResponse = $this->client->planResources($request);
if ($planResourcesResponse->isAlwaysAllowed()) {
// ...
}
else if ($planResourcesResult->isAlwaysDenied()) {
else if ($planResourcesResponse->isAlwaysDenied()) {
// ...
}
else {
Expand Down

0 comments on commit a46c028

Please sign in to comment.