BaseMax / GooglePlayWebServiceAPI

Tiny script to crawl information of a specific application in the Google play/store base on PHP.
MIT License
37 stars 9 forks source link

have parsePerms return a consistent array #18

Closed IzzySoft closed 3 years ago

IzzySoft commented 3 years ago

so you can use something like

$perms = $gplay->parsePerms($pkg)['grouped'];

without risking PHP notices when no data was retrieved.

BaseMax commented 3 years ago

Hey Izzy, What up man?

It's been about one year I don't have updates from you. everything is fine there?

About the PR: So the default value of "grouped" will be a empty array. Thanks;

IzzySoft commented 3 years ago

It's been about one year I don't have updates from you.

Thanks for asking, Max – but everything works fine, so why changing it? :smile: Or was there something I missed to deliver? Like from the reopened first issue?

And yes, all fine and much to do. Still alive and kicking, though :grin:

So the default value of "grouped" will be a empty array.

Exactly. Practically doesn't change a thing except for avoiding a PHP notice (which gracefully converts it to an empty array if addressed as such). If you want to make sure the app really has no permissions, there's still the success field you can check (i.e. empty array and success=1 means the app really has no perms, while with success=0 it simply means we failed obtaining data – that hasn't changed with this PR).