original_string: public static function castFrom($value): InputStream
      {
          if ($value instanceof InputStream) {
              return $value;
          }
  
          if (is_string($value)) {
              return new self($value);
          }
  
          throw new \InvalidArgumentException(
                  'Given value is neither an instance of' . InputStream::class
                  . ' nor a string denoting a file'
          );
      }
code: public static function castFrom($value): InputStream
      {
          if ($value instanceof InputStream) {
              return $value;
          }
  
          if (is_string($value)) {
              return new self($value);
          }
  
          throw new \InvalidArgumentException(
                  'Given value is neither an instance of' . InputStream::class
                  . ' nor a string denoting a file'
          );
      }
code_tokens: public static function castFrom ( $ value ) : InputStream { if ( $ value instanceof InputStream ) { return $ value ; } if ( is_string ( $ value ) ) { return new self ( $ value ) ; } throw new \ InvalidArgumentException ( 'Given value is neither an instance of' . InputStream :: class . ' nor a string denoting a file' ) ; }
docstring: casts given value to an input stream
  
  @param   \stubbles\streams\InputStream|string  $value
  @return  \stubbles\streams\InputStream
  @throws  \InvalidArgumentException
  @since   5.2.0
docstring_tokens: casts given value to an input stream