@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | /** |
401 | 401 | * \brief Set current chat ID. |
402 | 402 | * \details Change the chat ID on which the bot acts. |
403 | - * @param $chat_id The new chat ID to set. |
|
403 | + * @param string $chat_id The new chat ID to set. |
|
404 | 404 | */ |
405 | 405 | public function setChatID($chat_id) |
406 | 406 | { |
@@ -460,7 +460,6 @@ discard block |
||
460 | 460 | * \brief Process an API method by taking method and parameter. |
461 | 461 | * \details optionally create a object of $class class name with the response as constructor param. |
462 | 462 | * @param string $method Method to call. |
463 | - * @param array $param Parameter for the method. |
|
464 | 463 | * @param string $class Class name of the object to create using response. |
465 | 464 | * @return mixed Response or object of $class class name. |
466 | 465 | */ |
@@ -533,6 +532,9 @@ discard block |
||
533 | 532 | return $this->checkRequestError($response); |
534 | 533 | } |
535 | 534 | |
535 | + /** |
|
536 | + * @param \Psr\Http\Message\ResponseInterface $response |
|
537 | + */ |
|
536 | 538 | public function checkRequestError($response) |
537 | 539 | { |
538 | 540 | $http_code = $response->getStatusCode(); |
@@ -324,27 +324,27 @@ |
||
324 | 324 | Chat; |
325 | 325 | |
326 | 326 | /** @internal |
327 | - * \brief Chat_id of the user that interacted with the bot. */ |
|
327 | + * \brief Chat_id of the user that interacted with the bot. */ |
|
328 | 328 | protected $_chat_id; |
329 | 329 | |
330 | 330 | /** @internal |
331 | - * \brief Bot id. */ |
|
331 | + * \brief Bot id. */ |
|
332 | 332 | protected $_bot_id; |
333 | 333 | |
334 | 334 | /** @internal |
335 | - * \brief API endpoint (containing $token). */ |
|
335 | + * \brief API endpoint (containing $token). */ |
|
336 | 336 | protected $_api_url; |
337 | 337 | |
338 | 338 | /** @internal |
339 | - * \brief Implements interface for execute HTTP requests. */ |
|
339 | + * \brief Implements interface for execute HTTP requests. */ |
|
340 | 340 | public $_http; |
341 | 341 | |
342 | 342 | /** @internal |
343 | - * \brief Object of class PhpBotFramework\Entities\File that contain a path or resource to a file that has to be sent using Telegram API Methods. */ |
|
343 | + * \brief Object of class PhpBotFramework\Entities\File that contain a path or resource to a file that has to be sent using Telegram API Methods. */ |
|
344 | 344 | protected $_file; |
345 | 345 | |
346 | 346 | /** @internal |
347 | - * \brief Contains parameters of the next request. */ |
|
347 | + * \brief Contains parameters of the next request. */ |
|
348 | 348 | protected $parameters; |
349 | 349 | |
350 | 350 | /** |
@@ -6,6 +6,9 @@ |
||
6 | 6 | |
7 | 7 | class Parser |
8 | 8 | { |
9 | + /** |
|
10 | + * @param string $pathPattern |
|
11 | + */ |
|
9 | 12 | public function extractPlaceholders(Request $request, $pathPattern) |
10 | 13 | { |
11 | 14 | preg_match_all('#\{\w+\}#', $pathPattern, $placeholders, PREG_OFFSET_CAPTURE | PREG_SET_ORDER); |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace spec\Coduo\TuTu\Config\Element; |
4 | 4 | |
5 | 5 | use PhpSpec\ObjectBehavior; |
6 | -use Prophecy\Argument; |
|
7 | 6 | |
8 | 7 | class RequestSpec extends ObjectBehavior |
9 | 8 | { |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace spec\Coduo\TuTu\Config\Element; |
4 | 4 | |
5 | 5 | use PhpSpec\ObjectBehavior; |
6 | -use Prophecy\Argument; |
|
7 | 6 | |
8 | 7 | class ResponseSpec extends ObjectBehavior |
9 | 8 | { |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace spec\Coduo\TuTu\Config\Loader; |
4 | 4 | |
5 | 5 | use PhpSpec\ObjectBehavior; |
6 | -use Prophecy\Argument; |
|
7 | 6 | |
8 | 7 | class YamlLoaderSpec extends ObjectBehavior |
9 | 8 | { |
@@ -5,7 +5,6 @@ |
||
5 | 5 | use Coduo\PHPMatcher\Factory\SimpleFactory; |
6 | 6 | use Coduo\TuTu\Config\Element; |
7 | 7 | use PhpSpec\ObjectBehavior; |
8 | -use Prophecy\Argument; |
|
9 | 8 | use Symfony\Component\HttpFoundation\Request; |
10 | 9 | |
11 | 10 | class BodyMatchingPolicySpec extends ObjectBehavior |
@@ -5,7 +5,6 @@ |
||
5 | 5 | use Coduo\TuTu\Config\Element; |
6 | 6 | use Coduo\TuTu\Request\MatchingPolicy; |
7 | 7 | use PhpSpec\ObjectBehavior; |
8 | -use Prophecy\Argument; |
|
9 | 8 | use Symfony\Component\HttpFoundation\Request; |
10 | 9 | |
11 | 10 | class ChainMatchingPolicySpec extends ObjectBehavior |
@@ -5,7 +5,6 @@ |
||
5 | 5 | use Coduo\PHPMatcher\Factory\SimpleFactory; |
6 | 6 | use Coduo\TuTu\Config\Element; |
7 | 7 | use PhpSpec\ObjectBehavior; |
8 | -use Prophecy\Argument; |
|
9 | 8 | use Symfony\Component\HttpFoundation\Request; |
10 | 9 | |
11 | 10 | class HeadersMatchingPolicySpec extends ObjectBehavior |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Coduo\TuTu\Config\Element; |
6 | 6 | use PhpSpec\ObjectBehavior; |
7 | -use Prophecy\Argument; |
|
8 | 7 | use Symfony\Component\HttpFoundation\Request; |
9 | 8 | |
10 | 9 | class MethodMatchingPolicySpec extends ObjectBehavior |