Skip to content

#1048: Update code examples to reflect namespace changes #38

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Commands/CallbackqueryCommand.php
Original file line number Diff line number Diff line change
@@ -8,10 +8,10 @@
* file that was distributed with this source code.
*/

namespace Longman\TelegramBot\Commands\SystemCommands;
namespace PhpTelegramBot\Core\Commands\SystemCommands;

use Longman\TelegramBot\Commands\SystemCommand;
use Longman\TelegramBot\Request;
use PhpTelegramBot\Core\Commands\SystemCommand;
use PhpTelegramBot\Core\Request;

/**
* Callback query command
@@ -40,8 +40,8 @@ class CallbackqueryCommand extends SystemCommand
/**
* Command execute method
*
* @return \Longman\TelegramBot\Entities\ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException
* @return \PhpTelegramBot\Core\Entities\ServerResponse
* @throws \PhpTelegramBot\Core\Exception\TelegramException
*/
public function execute()
{
22 changes: 11 additions & 11 deletions Commands/CancelCommand.php
Original file line number Diff line number Diff line change
@@ -8,12 +8,12 @@
* file that was distributed with this source code.
*/

namespace Longman\TelegramBot\Commands\UserCommands;
namespace PhpTelegramBot\Core\Commands\UserCommands;

use Longman\TelegramBot\Commands\UserCommand;
use Longman\TelegramBot\Conversation;
use Longman\TelegramBot\Entities\Keyboard;
use Longman\TelegramBot\Request;
use PhpTelegramBot\Core\Commands\UserCommand;
use PhpTelegramBot\Core\Conversation;
use PhpTelegramBot\Core\Entities\Keyboard;
use PhpTelegramBot\Core\Request;

/**
* User "/cancel" command
@@ -52,8 +52,8 @@ class CancelCommand extends UserCommand
/**
* Command execute method
*
* @return \Longman\TelegramBot\Entities\ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException
* @return \PhpTelegramBot\Core\Entities\ServerResponse
* @throws \PhpTelegramBot\Core\Exception\TelegramException
*/
public function execute()
{
@@ -78,8 +78,8 @@ public function execute()
*
* @param string $text
*
* @return \Longman\TelegramBot\Entities\ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException
* @return \PhpTelegramBot\Core\Entities\ServerResponse
* @throws \PhpTelegramBot\Core\Exception\TelegramException
*/
private function removeKeyboard($text)
{
@@ -93,8 +93,8 @@ private function removeKeyboard($text)
/**
* Command execute method if MySQL is required but not available
*
* @return \Longman\TelegramBot\Entities\ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException
* @return \PhpTelegramBot\Core\Entities\ServerResponse
* @throws \PhpTelegramBot\Core\Exception\TelegramException
*/
public function executeNoDb()
{
8 changes: 4 additions & 4 deletions Commands/ChannelchatcreatedCommand.php
Original file line number Diff line number Diff line change
@@ -8,9 +8,9 @@
* file that was distributed with this source code.
*/

namespace Longman\TelegramBot\Commands\SystemCommands;
namespace PhpTelegramBot\Core\Commands\SystemCommands;

use Longman\TelegramBot\Commands\SystemCommand;
use PhpTelegramBot\Core\Commands\SystemCommand;

/**
* Channel chat created command
@@ -37,8 +37,8 @@ class ChannelchatcreatedCommand extends SystemCommand
/**
* Command execute method
*
* @return \Longman\TelegramBot\Entities\ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException
* @return \PhpTelegramBot\Core\Entities\ServerResponse
* @throws \PhpTelegramBot\Core\Exception\TelegramException
*/
public function execute()
{
8 changes: 4 additions & 4 deletions Commands/ChannelpostCommand.php
Original file line number Diff line number Diff line change
@@ -8,9 +8,9 @@
* file that was distributed with this source code.
*/

namespace Longman\TelegramBot\Commands\SystemCommands;
namespace PhpTelegramBot\Core\Commands\SystemCommands;

use Longman\TelegramBot\Commands\SystemCommand;
use PhpTelegramBot\Core\Commands\SystemCommand;

/**
* Channel post command
@@ -37,8 +37,8 @@ class ChannelpostCommand extends SystemCommand
/**
* Command execute method
*
* @return \Longman\TelegramBot\Entities\ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException
* @return \PhpTelegramBot\Core\Entities\ServerResponse
* @throws \PhpTelegramBot\Core\Exception\TelegramException
*/
public function execute()
{
8 changes: 4 additions & 4 deletions Commands/ChoseninlineresultCommand.php
Original file line number Diff line number Diff line change
@@ -8,9 +8,9 @@
* file that was distributed with this source code.
*/

namespace Longman\TelegramBot\Commands\SystemCommands;
namespace PhpTelegramBot\Core\Commands\SystemCommands;

use Longman\TelegramBot\Commands\SystemCommand;
use PhpTelegramBot\Core\Commands\SystemCommand;

/**
* Chosen inline result command
@@ -37,8 +37,8 @@ class ChoseninlineresultCommand extends SystemCommand
/**
* Command execute method
*
* @return \Longman\TelegramBot\Entities\ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException
* @return \PhpTelegramBot\Core\Entities\ServerResponse
* @throws \PhpTelegramBot\Core\Exception\TelegramException
*/
public function execute()
{
14 changes: 7 additions & 7 deletions Commands/DateCommand.php
Original file line number Diff line number Diff line change
@@ -8,13 +8,13 @@
* file that was distributed with this source code.
*/

namespace Longman\TelegramBot\Commands\UserCommands;
namespace PhpTelegramBot\Core\Commands\UserCommands;

use GuzzleHttp\Client;
use GuzzleHttp\Exception\RequestException;
use Longman\TelegramBot\Commands\UserCommand;
use Longman\TelegramBot\Request;
use Longman\TelegramBot\TelegramLog;
use PhpTelegramBot\Core\Commands\UserCommand;
use PhpTelegramBot\Core\Request;
use PhpTelegramBot\Core\TelegramLog;

/**
* User "/date" command
@@ -183,7 +183,7 @@ private function validateResponseData($data)
* @param string $location
*
* @return string
* @throws \Longman\TelegramBot\Exception\TelegramException
* @throws \PhpTelegramBot\Core\Exception\TelegramException
*/
private function getFormattedDate($location)
{
@@ -206,8 +206,8 @@ private function getFormattedDate($location)
/**
* Command execute method
*
* @return \Longman\TelegramBot\Entities\ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException
* @return \PhpTelegramBot\Core\Entities\ServerResponse
* @throws \PhpTelegramBot\Core\Exception\TelegramException
*/
public function execute()
{
8 changes: 4 additions & 4 deletions Commands/DeletechatphotoCommand.php
Original file line number Diff line number Diff line change
@@ -8,9 +8,9 @@
* file that was distributed with this source code.
*/

namespace Longman\TelegramBot\Commands\SystemCommands;
namespace PhpTelegramBot\Core\Commands\SystemCommands;

use Longman\TelegramBot\Commands\SystemCommand;
use PhpTelegramBot\Core\Commands\SystemCommand;

/**
* Delete chat photo command
@@ -37,8 +37,8 @@ class DeletechatphotoCommand extends SystemCommand
/**
* Command execute method
*
* @return \Longman\TelegramBot\Entities\ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException
* @return \PhpTelegramBot\Core\Entities\ServerResponse
* @throws \PhpTelegramBot\Core\Exception\TelegramException
*/
public function execute()
{
10 changes: 5 additions & 5 deletions Commands/EchoCommand.php
Original file line number Diff line number Diff line change
@@ -8,10 +8,10 @@
* file that was distributed with this source code.
*/

namespace Longman\TelegramBot\Commands\UserCommands;
namespace PhpTelegramBot\Core\Commands\UserCommands;

use Longman\TelegramBot\Commands\UserCommand;
use Longman\TelegramBot\Request;
use PhpTelegramBot\Core\Commands\UserCommand;
use PhpTelegramBot\Core\Request;

/**
* User "/echo" command
@@ -43,8 +43,8 @@ class EchoCommand extends UserCommand
/**
* Command execute method
*
* @return \Longman\TelegramBot\Entities\ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException
* @return \PhpTelegramBot\Core\Entities\ServerResponse
* @throws \PhpTelegramBot\Core\Exception\TelegramException
*/
public function execute()
{
8 changes: 4 additions & 4 deletions Commands/EditedchannelpostCommand.php
Original file line number Diff line number Diff line change
@@ -8,9 +8,9 @@
* file that was distributed with this source code.
*/

namespace Longman\TelegramBot\Commands\SystemCommands;
namespace PhpTelegramBot\Core\Commands\SystemCommands;

use Longman\TelegramBot\Commands\SystemCommand;
use PhpTelegramBot\Core\Commands\SystemCommand;

/**
* Edited channel post command
@@ -37,8 +37,8 @@ class EditedchannelpostCommand extends SystemCommand
/**
* Command execute method
*
* @return \Longman\TelegramBot\Entities\ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException
* @return \PhpTelegramBot\Core\Entities\ServerResponse
* @throws \PhpTelegramBot\Core\Exception\TelegramException
*/
public function execute()
{
8 changes: 4 additions & 4 deletions Commands/EditedmessageCommand.php
Original file line number Diff line number Diff line change
@@ -8,9 +8,9 @@
* file that was distributed with this source code.
*/

namespace Longman\TelegramBot\Commands\SystemCommands;
namespace PhpTelegramBot\Core\Commands\SystemCommands;

use Longman\TelegramBot\Commands\SystemCommand;
use PhpTelegramBot\Core\Commands\SystemCommand;

/**
* Edited message command
@@ -37,8 +37,8 @@ class EditedmessageCommand extends SystemCommand
/**
* Command execute method
*
* @return \Longman\TelegramBot\Entities\ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException
* @return \PhpTelegramBot\Core\Entities\ServerResponse
* @throws \PhpTelegramBot\Core\Exception\TelegramException
*/
public function execute()
{
10 changes: 5 additions & 5 deletions Commands/EditmessageCommand.php
Original file line number Diff line number Diff line change
@@ -8,10 +8,10 @@
* file that was distributed with this source code.
*/

namespace Longman\TelegramBot\Commands\UserCommands;
namespace PhpTelegramBot\Core\Commands\UserCommands;

use Longman\TelegramBot\Commands\UserCommand;
use Longman\TelegramBot\Request;
use PhpTelegramBot\Core\Commands\UserCommand;
use PhpTelegramBot\Core\Request;

/**
* User "/editmessage" command
@@ -43,8 +43,8 @@ class EditmessageCommand extends UserCommand
/**
* Command execute method
*
* @return \Longman\TelegramBot\Entities\ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException
* @return \PhpTelegramBot\Core\Entities\ServerResponse
* @throws \PhpTelegramBot\Core\Exception\TelegramException
*/
public function execute()
{
12 changes: 6 additions & 6 deletions Commands/ForcereplyCommand.php
Original file line number Diff line number Diff line change
@@ -8,11 +8,11 @@
* file that was distributed with this source code.
*/

namespace Longman\TelegramBot\Commands\UserCommands;
namespace PhpTelegramBot\Core\Commands\UserCommands;

use Longman\TelegramBot\Commands\UserCommand;
use Longman\TelegramBot\Entities\Keyboard;
use Longman\TelegramBot\Request;
use PhpTelegramBot\Core\Commands\UserCommand;
use PhpTelegramBot\Core\Entities\Keyboard;
use PhpTelegramBot\Core\Request;

/**
* User "/forcereply" command
@@ -44,8 +44,8 @@ class ForcereplyCommand extends UserCommand
/**
* Command execute method
*
* @return \Longman\TelegramBot\Entities\ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException
* @return \PhpTelegramBot\Core\Entities\ServerResponse
* @throws \PhpTelegramBot\Core\Exception\TelegramException
*/
public function execute()
{
10 changes: 5 additions & 5 deletions Commands/GenericCommand.php
Original file line number Diff line number Diff line change
@@ -8,10 +8,10 @@
* file that was distributed with this source code.
*/

namespace Longman\TelegramBot\Commands\SystemCommands;
namespace PhpTelegramBot\Core\Commands\SystemCommands;

use Longman\TelegramBot\Commands\SystemCommand;
use Longman\TelegramBot\Request;
use PhpTelegramBot\Core\Commands\SystemCommand;
use PhpTelegramBot\Core\Request;

/**
* Generic command
@@ -38,8 +38,8 @@ class GenericCommand extends SystemCommand
/**
* Command execute method
*
* @return \Longman\TelegramBot\Entities\ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException
* @return \PhpTelegramBot\Core\Entities\ServerResponse
* @throws \PhpTelegramBot\Core\Exception\TelegramException
*/
public function execute()
{
16 changes: 8 additions & 8 deletions Commands/GenericmessageCommand.php
Original file line number Diff line number Diff line change
@@ -8,11 +8,11 @@
* file that was distributed with this source code.
*/

namespace Longman\TelegramBot\Commands\SystemCommands;
namespace PhpTelegramBot\Core\Commands\SystemCommands;

use Longman\TelegramBot\Commands\SystemCommand;
use Longman\TelegramBot\Conversation;
use Longman\TelegramBot\Request;
use PhpTelegramBot\Core\Commands\SystemCommand;
use PhpTelegramBot\Core\Conversation;
use PhpTelegramBot\Core\Request;

/**
* Generic message command
@@ -44,8 +44,8 @@ class GenericmessageCommand extends SystemCommand
/**
* Command execute method if MySQL is required but not available
*
* @return \Longman\TelegramBot\Entities\ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException
* @return \PhpTelegramBot\Core\Entities\ServerResponse
* @throws \PhpTelegramBot\Core\Exception\TelegramException
*/
public function executeNoDb()
{
@@ -56,8 +56,8 @@ public function executeNoDb()
/**
* Command execute method
*
* @return \Longman\TelegramBot\Entities\ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException
* @return \PhpTelegramBot\Core\Entities\ServerResponse
* @throws \PhpTelegramBot\Core\Exception\TelegramException
*/
public function execute()
{
Loading