original_string: public static function setSource($source = null)
      {
          if (! is_resource($source) && ! is_null($source)) {
              throw new InvalidArgumentException(sprintf(
                  'Invalid source provided; must be a null or an resource, "%s" given.',
                  is_object($source) ? get_class($source) : gettype($source)
              ));
          }
          static::$source = $source;
      }
code: public static function setSource($source = null)
      {
          if (! is_resource($source) && ! is_null($source)) {
              throw new InvalidArgumentException(sprintf(
                  'Invalid source provided; must be a null or an resource, "%s" given.',
                  is_object($source) ? get_class($source) : gettype($source)
              ));
          }
          static::$source = $source;
      }
code_tokens: public static function setSource ( $ source = null ) { if ( ! is_resource ( $ source ) && ! is_null ( $ source ) ) { throw new InvalidArgumentException ( sprintf ( 'Invalid source provided; must be a null or an resource, "%s" given.' , is_object ( $ source ) ? get_class ( $ source ) : gettype ( $ source ) ) ) ; } static :: $ source = $ source ; }
docstring: Sets data source.
  
  @param null|resource $source
  
  @throws \InvalidArgumentException If invalid source provided
docstring_tokens: Sets data source .