public function getSmallestImageSet()
    {
        $imageSet = $this->getImageSet();

        $returnSize = PHP_INT_MAX;
        $returnSet = null;

        foreach ($imageSet as $set) {
            $size = $set->width * $set->height;
            if ($size < $returnSize) {
                $returnSize = $size;
                $returnSet = $set;
            }
        }

        if ($returnSet === null) {
            $returnSet = new \stdClass();
            $returnSet->slug = 'original';
        }

        return $returnSet;
    }
public function getSmallestImageSet()
    {
        $imageSet = $this->getImageSet();

        $returnSize = PHP_INT_MAX;
        $returnSet = null;

        foreach ($imageSet as $set) {
            $size = $set->width * $set->height;
            if ($size < $returnSize) {
                $returnSize = $size;
                $returnSet = $set;
            }
        }

        if ($returnSet === null) {
            $returnSet = new \stdClass();
            $returnSet->slug = 'original';
        }

        return $returnSet;
    }
public function getSmallestImageSet ( ) { $ imageSet = $ this -> getImageSet ( ) ; $ returnSize = PHP_INT_MAX ; $ returnSet = null ; foreach ( $ imageSet as $ set ) { $ size = $ set -> width * $ set -> height ; if ( $ size < $ returnSize ) { $ returnSize = $ size ; $ returnSet = $ set ; } } if ( $ returnSet === null ) { $ returnSet = new \ stdClass ( ) ; $ returnSet -> slug = 'original' ; } return $ returnSet ; }
Get the image set with the smallest size

@return \stdClass
Get the image set with the smallest size