Apply fixes from StyleCI
This commit is contained in:
parent
983912f188
commit
1ecd81ee82
|
@ -72,6 +72,7 @@ class API extends APIFactory
|
||||||
$this->API = $unserialized->API;
|
$this->API = $unserialized->API;
|
||||||
$this->APIFactory();
|
$this->APIFactory();
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->API = new MTProto($params);
|
$this->API = new MTProto($params);
|
||||||
|
|
|
@ -326,6 +326,7 @@ class Connection
|
||||||
$response = $this->read_http_payload();
|
$response = $this->read_http_payload();
|
||||||
if ($response['code'] !== 200) {
|
if ($response['code'] !== 200) {
|
||||||
Logger::log([$response['body']]);
|
Logger::log([$response['body']]);
|
||||||
|
|
||||||
throw new Exception($response['description'], $response['code']);
|
throw new Exception($response['description'], $response['code']);
|
||||||
}
|
}
|
||||||
$close = $response['protocol'] === 'HTTP/1.0';
|
$close = $response['protocol'] === 'HTTP/1.0';
|
||||||
|
|
|
@ -57,20 +57,28 @@ class Button implements \JsonSerializable, \ArrayAccess
|
||||||
{
|
{
|
||||||
return (array) $this->data;
|
return (array) $this->data;
|
||||||
}
|
}
|
||||||
public function offsetSet($name, $value) {
|
|
||||||
|
public function offsetSet($name, $value)
|
||||||
|
{
|
||||||
if ($name === null) {
|
if ($name === null) {
|
||||||
$this->data []= $value;
|
$this->data[] = $value;
|
||||||
} else {
|
} else {
|
||||||
$this->data[$name] = $value;
|
$this->data[$name] = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function offsetGet($name) {
|
|
||||||
|
public function offsetGet($name)
|
||||||
|
{
|
||||||
return $this->data[$name];
|
return $this->data[$name];
|
||||||
}
|
}
|
||||||
public function offsetUnset($name) {
|
|
||||||
|
public function offsetUnset($name)
|
||||||
|
{
|
||||||
unset($this->data[$name]);
|
unset($this->data[$name]);
|
||||||
}
|
}
|
||||||
public function offsetExists($name) {
|
|
||||||
|
public function offsetExists($name)
|
||||||
|
{
|
||||||
return isset($this->data[$name]);
|
return isset($this->data[$name]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user