Skip to content

Commit

Permalink
No need to make the properties readonly
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Apr 19, 2024
1 parent 5f15cf9 commit 5b1b693
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 29 deletions.
22 changes: 11 additions & 11 deletions src/FileId.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,64 +41,64 @@ public function __construct(
* 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,
) {
}

Expand Down
4 changes: 2 additions & 2 deletions src/PhotoSizeSource/PhotoSizeSourceDialogPhoto.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
abstract class PhotoSizeSourceDialogPhoto extends PhotoSizeSource
{
public function __construct(
public readonly int $dialogId,
public readonly int $dialogAccessHash,
public int $dialogId,
public int $dialogAccessHash,
) {
}
/**
Expand Down
2 changes: 1 addition & 1 deletion src/PhotoSizeSource/PhotoSizeSourceLegacy.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
final class PhotoSizeSourceLegacy extends PhotoSizeSource
{
public function __construct(
public readonly int $secret,
public int $secret,
) {
}
}
4 changes: 2 additions & 2 deletions src/PhotoSizeSource/PhotoSizeSourceStickersetThumbnail.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ public function __construct(
* Stickerset ID.
*
*/
public readonly int $stickerSetId,
public int $stickerSetId,
/**
* Stickerset access hash.
*
*/
public readonly int $stickerSetAccessHash
public int $stickerSetAccessHash
) {

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ public function __construct(
* 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
) {

}
Expand Down
4 changes: 2 additions & 2 deletions src/PhotoSizeSource/PhotoSizeSourceThumbnail.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ public function __construct(
* File type of original file.
*
*/
public readonly FileIdType $thumbFileType,
public FileIdType $thumbFileType,
/**
* Thumbnail size.
*
*/
public readonly string $thumbType,
public string $thumbType,
) {
}
}
16 changes: 8 additions & 8 deletions src/UniqueFileId.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,42 +37,42 @@ public function __construct(
* 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,
) {
}

Expand Down

0 comments on commit 5b1b693

Please sign in to comment.