src/RestGalleries/APIs/Flickr/Photo.php
private function extractPhotoArray($source)
    {
        if ($source->stat == 'fail') {
            return;
        }

        $data  = &$source->photo;

        $photo                     = [];
        $photo['id']               = $data->id;
        $photo['title']            = $data->title->_content;
        $photo['description']      = $data->description->_content;
        $photo['url']              = $data->urls->url[0]->_content;
        $photo['created']          = (string) $data->dates->posted;
        $photo['views']            = $data->views;
        $images                    = $this->fetchImages($photo['id']);
        $photo['source']           = $images[1];
        $photo['source_thumbnail'] = $images[0];

        return $photo;

    }
private function extractPhotoArray($source)
    {
        if ($source->stat == 'fail') {
            return;
        }

        $data  = &$source->photo;

        $photo                     = [];
        $photo['id']               = $data->id;
        $photo['title']            = $data->title->_content;
        $photo['description']      = $data->description->_content;
        $photo['url']              = $data->urls->url[0]->_content;
        $photo['created']          = (string) $data->dates->posted;
        $photo['views']            = $data->views;
        $images                    = $this->fetchImages($photo['id']);
        $photo['source']           = $images[1];
        $photo['source_thumbnail'] = $images[0];

        return $photo;

    }
Specific data are stored into an array and are returned, when it receive an failure, returns null.

@param  object $data
@return array|null