phpflickr icon indicating copy to clipboard operation
phpflickr copied to clipboard

ideas for next version: error handling and return types

Open tacman opened this issue 1 year ago • 0 comments


 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.

tacman avatar May 31 '24 12:05 tacman