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

ideas for next version: error handling and return types #64

Open
tacman opened this issue May 31, 2024 · 0 comments
Open

ideas for next version: error handling and return types #64

tacman opened this issue May 31, 2024 · 0 comments

Comments

@tacman
Copy link
Contributor

tacman commented May 31, 2024

 public function getPhotos(
        $photosetId,
        $userId = null,
        $extras = null,
        $perPage = null,
        $page = null,
        $privacyFilter = null,
        $media = null
    ) 

With PHP 8, we'll want to add a return type to the methods. Currently in getPhotos(), this is array|bool, but we could make it ?array, and return null instead of false.

It appears that returning false indicates some sort of error, though, so perhaps that's not the best approach.

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

No branches or pull requests

1 participant