Skip to content

Commit

Permalink
Private and Public channels unification
Browse files Browse the repository at this point in the history
  • Loading branch information
IDCT Bartosz Pachołek committed Jan 5, 2020
1 parent 3022fe1 commit 421e319
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 35 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ TelegramSender::sendMessage(Bot $bot, Channel $channel, string $message, ParseMo

Messages support __HTML__ and __Markdown__ depending on the `$parseMode` arguemnt's value.

`$channel` must be an instance of `PublicChannel` or `PrivateChannel`.
`$channel` must be an instance of `PublicChannel` or `PrivateChannel` (this is future-proof mechanism as for some methods which are not yet implemented it matters).

Example:
```php
Expand Down
12 changes: 2 additions & 10 deletions src/PublicChannel.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,7 @@
/**
* Representation of a public channel.
*/
class PublicChannel extends Channel
class PublicChannel extends PrivateChannel
{
/**
* Returns the channel key, for public channels it is equal to channel id.
*
* @return int
*/
public function getChannelKey() : int
{
return $this->channelId;
}

}
24 changes: 0 additions & 24 deletions tests/PublicChannelTest.php

This file was deleted.

0 comments on commit 421e319

Please sign in to comment.