-
-
Notifications
You must be signed in to change notification settings - Fork 662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Some Bounded methods #1395
Add Some Bounded methods #1395
Changes from 24 commits
0f960b9
a9fc8bc
586f11d
d0f3002
c135261
e424c0d
4b1cbb1
8522593
4996949
e295693
9c48c5d
eae2256
adbed66
ecbf46e
a7c4eec
9c4e852
66d2e4f
e5ce171
349cdaf
6694f5e
0cb77bd
b7292fa
cb503d3
54eb52d
fcc0b6b
dc012cb
48983ee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of MadelineProto. | ||
* MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. | ||
* MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
* See the GNU Affero General Public License for more details. | ||
* You should have received a copy of the GNU General Public License along with MadelineProto. | ||
* If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* @author Daniil Gentili <daniil@daniil.it> | ||
* @copyright 2016-2023 Daniil Gentili <daniil@daniil.it> | ||
* @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 | ||
* @link https://docs.madelineproto.xyz MadelineProto documentation | ||
*/ | ||
|
||
namespace danog\MadelineProto\EventHandler\Message\Service; | ||
|
||
use danog\MadelineProto\EventHandler\Message\ServiceMessage; | ||
use danog\MadelineProto\MTProto; | ||
|
||
/** @internal */ | ||
abstract class AbstractDialogCallGroup extends ServiceMessage | ||
{ | ||
public function __construct( | ||
MTProto $API, | ||
array $rawMessage, | ||
array $info, | ||
|
||
/** Group call ID */ | ||
public readonly int $id, | ||
/** Group call access hash */ | ||
public readonly int $accessHash | ||
) { | ||
parent::__construct($API, $rawMessage, $info); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of MadelineProto. | ||
* MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. | ||
* MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
* See the GNU Affero General Public License for more details. | ||
* You should have received a copy of the GNU General Public License along with MadelineProto. | ||
* If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* @author Daniil Gentili <daniil@daniil.it> | ||
* @copyright 2016-2023 Daniil Gentili <daniil@daniil.it> | ||
* @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 | ||
* @link https://docs.madelineproto.xyz MadelineProto documentation | ||
*/ | ||
|
||
namespace danog\MadelineProto\EventHandler\Message\Service\DialogCallGroup; | ||
|
||
use danog\MadelineProto\EventHandler\Message\Service\AbstractDialogCallGroup; | ||
use danog\MadelineProto\MTProto; | ||
|
||
/** | ||
* The group call has ended. | ||
*/ | ||
final class Called extends AbstractDialogCallGroup | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we name the namespace There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same for the other classes in the DialogGroupCall namespace |
||
{ | ||
public function __construct( | ||
MTProto $API, | ||
array $rawMessage, | ||
array $info, | ||
|
||
/** Group call ID */ | ||
int $id, | ||
/** Group call access hash */ | ||
int $accessHash, | ||
/** Group call duration */ | ||
public readonly int $duration | ||
) { | ||
parent::__construct($API, $rawMessage, $info, $id, $accessHash); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of MadelineProto. | ||
* MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. | ||
* MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
* See the GNU Affero General Public License for more details. | ||
* You should have received a copy of the GNU General Public License along with MadelineProto. | ||
* If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* @author Daniil Gentili <daniil@daniil.it> | ||
* @copyright 2016-2023 Daniil Gentili <daniil@daniil.it> | ||
* @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 | ||
* @link https://docs.madelineproto.xyz MadelineProto documentation | ||
*/ | ||
|
||
namespace danog\MadelineProto\EventHandler\Message\Service\DialogCallGroup; | ||
|
||
use danog\MadelineProto\EventHandler\Message\Service\AbstractDialogCallGroup; | ||
use danog\MadelineProto\MTProto; | ||
|
||
/** | ||
* A set of users was invited to the group call. | ||
*/ | ||
final class Invited extends AbstractDialogCallGroup | ||
{ | ||
public function __construct( | ||
MTProto $API, | ||
array $rawMessage, | ||
array $info, | ||
|
||
/** Group call ID */ | ||
int $id, | ||
/** Group call access hash */ | ||
int $accessHash, | ||
/** The invited users */ | ||
public readonly array $users | ||
) { | ||
parent::__construct($API, $rawMessage, $info, $id, $accessHash); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of MadelineProto. | ||
* MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. | ||
* MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
* See the GNU Affero General Public License for more details. | ||
* You should have received a copy of the GNU General Public License along with MadelineProto. | ||
* If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* @author Daniil Gentili <daniil@daniil.it> | ||
* @copyright 2016-2023 Daniil Gentili <daniil@daniil.it> | ||
* @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 | ||
* @link https://docs.madelineproto.xyz MadelineProto documentation | ||
*/ | ||
|
||
namespace danog\MadelineProto\EventHandler\Message\Service\DialogCallGroup; | ||
|
||
use danog\MadelineProto\EventHandler\Message\Service\AbstractDialogCallGroup; | ||
use danog\MadelineProto\MTProto; | ||
|
||
/** | ||
* A group call was scheduled. | ||
*/ | ||
final class Scheduled extends AbstractDialogCallGroup | ||
{ | ||
public function __construct( | ||
MTProto $API, | ||
array $rawMessage, | ||
array $info, | ||
|
||
/** Group call ID */ | ||
int $id, | ||
/** Group call access hash */ | ||
int $accessHash, | ||
/** When is this group call scheduled to start */ | ||
public readonly int $scheduleDate | ||
) { | ||
parent::__construct($API, $rawMessage, $info, $id, $accessHash); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mark only the constructor as
@internal
, not the class pls