Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
TelegramBot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
TelegramBot
Commits
a461ac76
Commit
a461ac76
authored
Feb 04, 2016
by
MBoretto
Browse files
Options
Browse Files
Download
Plain Diff
resolve conflict
parents
6baf1730
9c43213f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
18 deletions
+17
-18
CONTRIBUTING.md
CONTRIBUTING.md
+8
-8
Command.php
src/Command.php
+3
-4
Telegram.php
src/Telegram.php
+6
-6
No files found.
CONTRIBUTING.md
View file @
a461ac76
...
...
@@ -22,12 +22,14 @@ If you develop a new feature please create a new branch.
Version
-------
Version number: 0.#version.#hotfix
Further code convention adopted
-------------------------------
-
Each method and class is documented with a docblock
Example for a function or methods:
```
/**
...
...
@@ -39,10 +41,9 @@ Example for a function or methods:
*/
```
-
Each file is provided with the following header:
```
/*
/*
*
* This file is part of the TelegramBot package.
*
* (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
...
...
@@ -53,10 +54,9 @@ Example for a function or methods:
```
-
No empty line after class declaration
-
No empty line after
`<?php`
-
Last element of a
rray must end with co
ma
-
One empty line after the doc
k
block header
-
Array
and use statement must be written in alphabetical order
-
Last element of a
multi-line array must be followed by a com
ma
-
One empty line after the docblock header
-
Array
elements and
`use`
statements should be written in a logical order, preferrably alphabetically
-
Use
[]
instead of array()
-
Use
''
for string
-
Use
single quotes (
`'`
)
for string
-
Leave space in front and behind the concatenation operator
`.`
src/Command.php
View file @
a461ac76
...
...
@@ -15,8 +15,7 @@ use Longman\TelegramBot\Entities\Update;
use
Longman\TelegramBot\Entities\User
;
/**
* Class Commad.
*
* Class Command
*/
abstract
class
Command
{
...
...
@@ -180,8 +179,8 @@ abstract class Command
/**
* Get command config
*
* Look for parame
n
ter $name if found return it, if not return null.
* If $name is not set return the all
params setted
* Look for parameter $name if found return it, if not return null.
* If $name is not set return the all
set params
*
* @param string|null $name
* @return mixed
...
...
src/Telegram.php
View file @
a461ac76
...
...
@@ -7,6 +7,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace
Longman\TelegramBot
;
define
(
'BASE_PATH'
,
dirname
(
__FILE__
));
...
...
@@ -61,8 +62,7 @@ class Telegram
/**
* Row custom update (json)
*
* Used to inject a custom update fot testing purpose in the
* request class
* Used to inject a custom update for testing purposes in the Request class
*
* @var string
*/
...
...
@@ -376,8 +376,8 @@ class Telegram
/**
* Handle bot request from wekhook
*
* @todo Should return the executed command result (true
,
false) but we shoud check if all commands return a value.
* Furthermore this function is the tw
een of handleGetUpdates for webhook, but the first return
the ServerResponse
* @todo Should return the executed command result (true
|
false) but we shoud check if all commands return a value.
* Furthermore this function is the tw
in of handleGetUpdates for webhook, but the first returns
the ServerResponse
* instead the latter return if the command has failed or not (true|false).
* We shoud use the same convention for both.
*
...
...
@@ -514,11 +514,11 @@ class Telegram
/**
* Get command class
*
* @todo check return
*
* @param string $command
* @param \Longman\TelegramBot\Entities\ServerResponse|null $update
*
* @TODO check return
*
* @return object
*/
public
function
getCommandClass
(
$command
,
Update
$update
=
null
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment