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

feat: add flags to CloudFunction delete function #123

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bshaffer
Copy link
Contributor

@bshaffer bshaffer commented Apr 4, 2023

No description provided.

* @param int $retries optional The number of retries upon failure
*
* @return bool true if the function is succesfully deleted, otherwise false
*/
public function delete($retries = 3)
public function delete(array $flags = [], $retries = 3)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to make sure we're not setting this anywhere. My guess is that we aren't, and so changing the order is fine.

$flattenedFlags = [];
foreach ($flags as $name => $value) {
$flattenedFlags[] = empty($value) ? $name : "$name=$value";
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we now do this twice, maybe abstract to a private function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant