From 5b1b69369e13a16b7a4905bf034a8ed997e5eaf8 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Fri, 19 Apr 2024 23:31:39 +0200 Subject: [PATCH] No need to make the properties readonly --- src/FileId.php | 22 +++++++++---------- .../PhotoSizeSourceDialogPhoto.php | 4 ++-- src/PhotoSizeSource/PhotoSizeSourceLegacy.php | 2 +- .../PhotoSizeSourceStickersetThumbnail.php | 4 ++-- ...toSizeSourceStickersetThumbnailVersion.php | 6 ++--- .../PhotoSizeSourceThumbnail.php | 4 ++-- src/UniqueFileId.php | 16 +++++++------- 7 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/FileId.php b/src/FileId.php index 5adad37..5b7bc0b 100644 --- a/src/FileId.php +++ b/src/FileId.php @@ -41,64 +41,64 @@ final class FileId * DC ID. * */ - public readonly int $dcId, + public int $dcId, /** * File type. * */ - public readonly FileIdType $type, + public FileIdType $type, /** * File id. * */ - public readonly ?int $id, + public ?int $id, /** * File access hash. * */ - public readonly int $accessHash, + public int $accessHash, /** * Photo size source. * */ - public readonly ?PhotoSizeSource $photoSizeSource = null, + public ?PhotoSizeSource $photoSizeSource = null, /** * Photo volume ID. * */ - public readonly ?int $volumeId = null, + public ?int $volumeId = null, /** * Photo local ID. * */ - public readonly ?int $localId = null, + public ?int $localId = null, /** * File reference. * */ - public readonly ?string $fileReference = null, + public ?string $fileReference = null, /** * File URL for weblocation. * */ - public readonly ?string $url = null, + public ?string $url = null, /** * Bot API file ID version. * */ - public readonly int $version = 4, + public int $version = 4, /** * Bot API file ID subversion. * */ - public readonly int $subVersion = 47, + public int $subVersion = 47, ) { } diff --git a/src/PhotoSizeSource/PhotoSizeSourceDialogPhoto.php b/src/PhotoSizeSource/PhotoSizeSourceDialogPhoto.php index 9e94dbd..fe112e7 100644 --- a/src/PhotoSizeSource/PhotoSizeSourceDialogPhoto.php +++ b/src/PhotoSizeSource/PhotoSizeSourceDialogPhoto.php @@ -28,8 +28,8 @@ use danog\Decoder\PhotoSizeSource; abstract class PhotoSizeSourceDialogPhoto extends PhotoSizeSource { public function __construct( - public readonly int $dialogId, - public readonly int $dialogAccessHash, + public int $dialogId, + public int $dialogAccessHash, ) { } /** diff --git a/src/PhotoSizeSource/PhotoSizeSourceLegacy.php b/src/PhotoSizeSource/PhotoSizeSourceLegacy.php index 56ae157..4af1342 100644 --- a/src/PhotoSizeSource/PhotoSizeSourceLegacy.php +++ b/src/PhotoSizeSource/PhotoSizeSourceLegacy.php @@ -28,7 +28,7 @@ use danog\Decoder\PhotoSizeSource; final class PhotoSizeSourceLegacy extends PhotoSizeSource { public function __construct( - public readonly int $secret, + public int $secret, ) { } } diff --git a/src/PhotoSizeSource/PhotoSizeSourceStickersetThumbnail.php b/src/PhotoSizeSource/PhotoSizeSourceStickersetThumbnail.php index eb055e3..a09eec4 100644 --- a/src/PhotoSizeSource/PhotoSizeSourceStickersetThumbnail.php +++ b/src/PhotoSizeSource/PhotoSizeSourceStickersetThumbnail.php @@ -32,12 +32,12 @@ final class PhotoSizeSourceStickersetThumbnail extends PhotoSizeSource * Stickerset ID. * */ - public readonly int $stickerSetId, + public int $stickerSetId, /** * Stickerset access hash. * */ - public readonly int $stickerSetAccessHash + public int $stickerSetAccessHash ) { } diff --git a/src/PhotoSizeSource/PhotoSizeSourceStickersetThumbnailVersion.php b/src/PhotoSizeSource/PhotoSizeSourceStickersetThumbnailVersion.php index 7ff55f9..052258d 100644 --- a/src/PhotoSizeSource/PhotoSizeSourceStickersetThumbnailVersion.php +++ b/src/PhotoSizeSource/PhotoSizeSourceStickersetThumbnailVersion.php @@ -32,17 +32,17 @@ final class PhotoSizeSourceStickersetThumbnailVersion extends PhotoSizeSource * Stickerset ID. * */ - public readonly int $stickerSetId, + public int $stickerSetId, /** * Stickerset access hash. * */ - public readonly int $stickerSetAccessHash, + public int $stickerSetAccessHash, /** * Stickerset version. * */ - public readonly int $stickerSetVersion + public int $stickerSetVersion ) { } diff --git a/src/PhotoSizeSource/PhotoSizeSourceThumbnail.php b/src/PhotoSizeSource/PhotoSizeSourceThumbnail.php index 348151f..50df7ea 100644 --- a/src/PhotoSizeSource/PhotoSizeSourceThumbnail.php +++ b/src/PhotoSizeSource/PhotoSizeSourceThumbnail.php @@ -33,12 +33,12 @@ final class PhotoSizeSourceThumbnail extends PhotoSizeSource * File type of original file. * */ - public readonly FileIdType $thumbFileType, + public FileIdType $thumbFileType, /** * Thumbnail size. * */ - public readonly string $thumbType, + public string $thumbType, ) { } } diff --git a/src/UniqueFileId.php b/src/UniqueFileId.php index f85ddb9..0b1e802 100644 --- a/src/UniqueFileId.php +++ b/src/UniqueFileId.php @@ -37,42 +37,42 @@ final class UniqueFileId * File type. * */ - public readonly UniqueFileIdType $type, + public UniqueFileIdType $type, /** * File ID. * */ - public readonly ?int $id = null, + public ?int $id = null, /** * Photo subtype. * */ - public readonly ?int $subType = null, + public ?int $subType = null, /** * Photo volume ID. * */ - public readonly ?int $volumeId = null, + public ?int $volumeId = null, /** * Photo local ID. * */ - public readonly ?int $localId = null, + public ?int $localId = null, /** * Sticker set ID. * */ - public readonly ?int $stickerSetId = null, + public ?int $stickerSetId = null, /** * Sticker set version. * */ - public readonly ?int $stickerSetVersion = null, + public ?int $stickerSetVersion = null, /** * Weblocation URL. * */ - public readonly ?string $url= null, + public ?string $url= null, ) { }