Skip to content

Commit

Permalink
Correct type
Browse files Browse the repository at this point in the history
  • Loading branch information
TiiFuchs committed May 4, 2022
1 parent a43267d commit c5ae260
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 21 deletions.
8 changes: 3 additions & 5 deletions src/Telegram/InputMediaAnimation.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@

namespace Tii\Telepath\Telegram;

use Tii\Telepath\InputFile;

/**
* Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.
*/
class InputMediaAnimation extends InputMedia
{
/** Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files » */
public InputFile|string|null $thumb = null;
public \Tii\Telepath\InputFile|string|null $thumb = null;

/** Optional. Animation width */
public ?int $width = null;
Expand All @@ -27,13 +25,13 @@ class InputMediaAnimation extends InputMedia


/**
* @param InputFile|string $thumb Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
* @param \Tii\Telepath\InputFile|string $thumb Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
* @param int $width Optional. Animation width
* @param int $height Optional. Animation height
* @param int $duration Optional. Animation duration in seconds
*/
public static function make(
InputFile|string|null $thumb = null,
\Tii\Telepath\InputFile|string|null $thumb = null,
?int $width = null,
?int $height = null,
?int $duration = null
Expand Down
8 changes: 3 additions & 5 deletions src/Telegram/InputMediaAudio.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@

namespace Tii\Telepath\Telegram;

use Tii\Telepath\InputFile;

/**
* Represents an audio file to be treated as music to be sent.
*/
class InputMediaAudio extends InputMedia
{
/** Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files » */
public InputFile|string|null $thumb = null;
public \Tii\Telepath\InputFile|string|null $thumb = null;

/** Optional. Duration of the audio in seconds */
public ?int $duration = null;
Expand All @@ -27,13 +25,13 @@ class InputMediaAudio extends InputMedia


/**
* @param InputFile|string $thumb Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
* @param \Tii\Telepath\InputFile|string $thumb Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
* @param int $duration Optional. Duration of the audio in seconds
* @param string $performer Optional. Performer of the audio
* @param string $title Optional. Title of the audio
*/
public static function make(
InputFile|string|null $thumb = null,
\Tii\Telepath\InputFile|string|null $thumb = null,
?int $duration = null,
?string $performer = null,
?string $title = null
Expand Down
12 changes: 6 additions & 6 deletions src/Telegram/InputMediaDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@

namespace Tii\Telepath\Telegram;

use Tii\Telepath\InputFile;

/**
* Represents a general file to be sent.
*/
class InputMediaDocument extends InputMedia
{
/** Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files » */
public InputFile|string|null $thumb = null;
public \Tii\Telepath\InputFile|string|null $thumb = null;

/** Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always True, if the document is sent as part of an album. */
public ?bool $disable_content_type_detection = null;


/**
* @param InputFile|string $thumb Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
* @param \Tii\Telepath\InputFile|string $thumb Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
* @param bool $disable_content_type_detection Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always True, if the document is sent as part of an album.
*/
public static function make(InputFile|string|null $thumb = null, ?bool $disable_content_type_detection = null): static
{
public static function make(
\Tii\Telepath\InputFile|string|null $thumb = null,
?bool $disable_content_type_detection = null
): static {
return new static([
'thumb' => $thumb,
'disable_content_type_detection' => $disable_content_type_detection,
Expand Down
8 changes: 3 additions & 5 deletions src/Telegram/InputMediaVideo.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@

namespace Tii\Telepath\Telegram;

use Tii\Telepath\InputFile;

/**
* Represents a video to be sent.
*/
class InputMediaVideo extends InputMedia
{
/** Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files » */
public InputFile|string|null $thumb = null;
public \Tii\Telepath\InputFile|string|null $thumb = null;

/** Optional. Video width */
public ?int $width = null;
Expand All @@ -30,14 +28,14 @@ class InputMediaVideo extends InputMedia


/**
* @param InputFile|string $thumb Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
* @param \Tii\Telepath\InputFile|string $thumb Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
* @param int $width Optional. Video width
* @param int $height Optional. Video height
* @param int $duration Optional. Video duration in seconds
* @param bool $supports_streaming Optional. Pass True, if the uploaded video is suitable for streaming
*/
public static function make(
InputFile|string|null $thumb = null,
\Tii\Telepath\InputFile|string|null $thumb = null,
?int $width = null,
?int $height = null,
?int $duration = null,
Expand Down
Binary file modified telepathy
Binary file not shown.

0 comments on commit c5ae260

Please sign in to comment.