php-snapchat icon indicating copy to clipboard operation
php-snapchat copied to clipboard

Update snapchat_agent.php

Open acdameli opened this issue 9 years ago • 1 comments

separate isMedia into isImage and isVideo functions which can be used independently to identify if the media is an image or a video. The isMedia function relies on the individual functions and allows a consumer of this class to use these headers which are much more accurate than the media_type attribute which I have (anecdotally) found to be unreliable.

You seem to prefer the more verbose:

if (test) {
  return TRUE;
}
return FALSE;

pattern, I didn't look very hard for contribution guidelines so I went with the a condensed style. Let me know if you have a strong preference for the other style.

acdameli avatar Dec 18 '14 15:12 acdameli

You need to change line 180 return isImage($data) || isVideo($data); To return $this->isImage($data) || $this->isVideo($data); Or else you'll get an undefined function error.

Voiceeeeee avatar Jan 02 '15 12:01 Voiceeeeee