@@ -159,7 +159,7 @@ |
||
159 | 159 | } |
160 | 160 | |
161 | 161 | /** |
162 | - * @return array |
|
162 | + * @return MessageEntityArray |
|
163 | 163 | */ |
164 | 164 | public function getEntities() |
165 | 165 | { |
@@ -41,6 +41,9 @@ |
||
41 | 41 | ); |
42 | 42 | } |
43 | 43 | |
44 | + /** |
|
45 | + * @param string|null $apiMethodName |
|
46 | + */ |
|
44 | 47 | public function request($apiMethodName, $requestOptions = []) |
45 | 48 | { |
46 | 49 | $method = static::METHOD_POST; |
@@ -23,6 +23,9 @@ |
||
23 | 23 | */ |
24 | 24 | protected $fileName; |
25 | 25 | |
26 | + /** |
|
27 | + * @param string $path |
|
28 | + */ |
|
26 | 29 | public function __construct($path) |
27 | 30 | { |
28 | 31 | $this->initEnv($path); |
@@ -48,7 +48,7 @@ |
||
48 | 48 | |
49 | 49 | protected function getFileName() |
50 | 50 | { |
51 | - $env = getenv('ENV') ? '_' . getenv('ENV') : ''; |
|
51 | + $env = getenv('ENV') ? '_'.getenv('ENV') : ''; |
|
52 | 52 | |
53 | 53 | return sprintf(static::FILE_NAME, $env); |
54 | 54 | } |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | |
39 | 39 | public function __construct(ConfigContainer $config) |
40 | 40 | { |
41 | - define('TEEBOT_ROOT', realpath(__DIR__ . '/../')); |
|
41 | + define('TEEBOT_ROOT', realpath(__DIR__.'/../')); |
|
42 | 42 | |
43 | 43 | $this->init($config); |
44 | 44 | } |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | if ($response instanceof Response) { |
98 | 98 | $offset = $response->getOffset(); |
99 | 99 | } |
100 | - } catch (\Exception $e){ |
|
100 | + } catch (\Exception $e) { |
|
101 | 101 | $this->logger->exception($e); |
102 | 102 | } |
103 | 103 |
@@ -142,7 +142,7 @@ |
||
142 | 142 | $entity = null; |
143 | 143 | |
144 | 144 | if (!class_exists($entityClass)) { |
145 | - throw new BuildEntityException('Entity "' . $entityClass . '" does not exists or not supported yet!'); |
|
145 | + throw new BuildEntityException('Entity "'.$entityClass.'" does not exists or not supported yet!'); |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | /** @var AbstractEntity $entity */ |
@@ -21,7 +21,7 @@ |
||
21 | 21 | public function __construct(ConfigContainer $config) |
22 | 22 | { |
23 | 23 | $this->config = $config; |
24 | - $filename = TEEBOT_ROOT . $this->config->get('logger.filename'); |
|
24 | + $filename = TEEBOT_ROOT.$this->config->get('logger.filename'); |
|
25 | 25 | $this->logger = new Monolog('Teebot'); |
26 | 26 | $this->logger->pushHandler( |
27 | 27 | new StreamHandler($filename, Monolog::WARNING) |
@@ -25,7 +25,7 @@ |
||
25 | 25 | */ |
26 | 26 | protected function getSetGetMethodName($prefix, $name) |
27 | 27 | { |
28 | - $setter = $prefix . str_replace("_", "", ucwords($name, "_")); |
|
28 | + $setter = $prefix.str_replace("_", "", ucwords($name, "_")); |
|
29 | 29 | |
30 | 30 | if (method_exists($this, $setter)) { |
31 | 31 | return $setter; |
@@ -6,7 +6,7 @@ |
||
6 | 6 | |
7 | 7 | class MessageEntityArray extends AbstractEntity |
8 | 8 | { |
9 | - const ENTITY_TYPE = 'MessageEntityArray'; |
|
9 | + const ENTITY_TYPE = 'MessageEntityArray'; |
|
10 | 10 | |
11 | 11 | protected $entities; |
12 | 12 |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | class UserProfilePhotos extends AbstractEntity |
6 | 6 | { |
7 | - const ENTITY_TYPE = 'UserProfilePhotos'; |
|
7 | + const ENTITY_TYPE = 'UserProfilePhotos'; |
|
8 | 8 | |
9 | 9 | protected $total_count; |
10 | 10 |