Apply fixes from StyleCI

This commit is contained in:
Daniil Gentili 2018-02-25 09:53:22 +00:00 committed by StyleCI Bot
parent 983912f188
commit 1ecd81ee82
3 changed files with 15 additions and 5 deletions

View File

@ -72,6 +72,7 @@ class API extends APIFactory
$this->API = $unserialized->API;
$this->APIFactory();
}
return;
}
$this->API = new MTProto($params);

View File

@ -326,6 +326,7 @@ class Connection
$response = $this->read_http_payload();
if ($response['code'] !== 200) {
Logger::log([$response['body']]);
throw new Exception($response['description'], $response['code']);
}
$close = $response['protocol'] === 'HTTP/1.0';

View File

@ -57,20 +57,28 @@ class Button implements \JsonSerializable, \ArrayAccess
{
return (array) $this->data;
}
public function offsetSet($name, $value) {
public function offsetSet($name, $value)
{
if ($name === null) {
$this->data []= $value;
$this->data[] = $value;
} else {
$this->data[$name] = $value;
}
}
public function offsetGet($name) {
public function offsetGet($name)
{
return $this->data[$name];
}
public function offsetUnset($name) {
public function offsetUnset($name)
{
unset($this->data[$name]);
}
public function offsetExists($name) {
public function offsetExists($name)
{
return isset($this->data[$name]);
}
}