Commit 9c43213f authored by Marco Boretto's avatar Marco Boretto

Merge pull request #84 from noplanman/further_code_cleanup

Some typo corrections.
parents 970ae10b 1249dfc9
...@@ -22,6 +22,7 @@ If you develop a new feature please create a new branch. ...@@ -22,6 +22,7 @@ If you develop a new feature please create a new branch.
Version Version
------- -------
Version number: 0.#version.#hotfix Version number: 0.#version.#hotfix
Further code convention adopted Further code convention adopted
...@@ -30,7 +31,7 @@ Further code convention adopted ...@@ -30,7 +31,7 @@ Further code convention adopted
- Each method and class is documented with a docblock - Each method and class is documented with a docblock
- Each file is provided with the following header: - Each file is provided with the following header:
``` ```
/* /**
* This file is part of the TelegramBot package. * This file is part of the TelegramBot package.
* *
* (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com> * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
...@@ -41,10 +42,9 @@ Further code convention adopted ...@@ -41,10 +42,9 @@ Further code convention adopted
``` ```
- No empty line after class declaration - No empty line after class declaration
- No empty line after `<?php` - No empty line after `<?php`
- Last element of array must end with coma - Last element of a multi-line array must be followed by a comma
- One empty line after the dockblock header - One empty line after the docblock header
- Array and use statement must be written in alphabetical order - Array elements and `use` statements should be written in a logical order, preferrably alphabetically
- Use [] instead of array() - Use [] instead of array()
- Use '' for string - Use single quotes (`'`) for string
- Leave space in front and behind the concatenation operator `.` - Leave space in front and behind the concatenation operator `.`
...@@ -15,8 +15,7 @@ use Longman\TelegramBot\Entities\Update; ...@@ -15,8 +15,7 @@ use Longman\TelegramBot\Entities\Update;
use Longman\TelegramBot\Entities\User; use Longman\TelegramBot\Entities\User;
/** /**
* Class Commad. * Class Command
*
*/ */
abstract class Command abstract class Command
{ {
...@@ -180,8 +179,8 @@ abstract class Command ...@@ -180,8 +179,8 @@ abstract class Command
/** /**
* Get command config * Get command config
* *
* Look for paramenter $name if found return it, if not return null. * Look for parameter $name if found return it, if not return null.
* If $name is not set return the all params setted * If $name is not set return the all set params
* *
* @param string|null $name * @param string|null $name
* @return mixed * @return mixed
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
namespace Longman\TelegramBot; namespace Longman\TelegramBot;
define('BASE_PATH', dirname(__FILE__)); define('BASE_PATH', dirname(__FILE__));
...@@ -61,8 +62,7 @@ class Telegram ...@@ -61,8 +62,7 @@ class Telegram
/** /**
* Row custom update (json) * Row custom update (json)
* *
* Used to inject a custom update fot testing purpose in the * Used to inject a custom update for testing purposes in the Request class
* request class
* *
* @var string * @var string
*/ */
...@@ -376,8 +376,8 @@ class Telegram ...@@ -376,8 +376,8 @@ class Telegram
/** /**
* Handle bot request from wekhook * Handle bot request from wekhook
* *
* @todo Should return the executed command result (true,false) but we shoud check if all commands return a value. * @todo Should return the executed command result (true|false) but we shoud check if all commands return a value.
* Furthermore this function is the tween of handleGetUpdates for webhook, but the first return the ServerResponse * Furthermore this function is the twin of handleGetUpdates for webhook, but the first returns the ServerResponse
* instead the latter return if the command has failed or not (true|false). * instead the latter return if the command has failed or not (true|false).
* We shoud use the same convention for both. * We shoud use the same convention for both.
* *
...@@ -514,11 +514,11 @@ class Telegram ...@@ -514,11 +514,11 @@ class Telegram
/** /**
* Get command class * Get command class
* *
* @todo check return
*
* @param string $command * @param string $command
* @param \Longman\TelegramBot\Entities\ServerResponse|null $update * @param \Longman\TelegramBot\Entities\ServerResponse|null $update
* *
* @TODO check return
*
* @return object * @return object
*/ */
public function getCommandClass($command, Update $update = null) public function getCommandClass($command, Update $update = null)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment