diff --git a/a.php b/a.php index 0f909c9d..250f7f30 100644 --- a/a.php +++ b/a.php @@ -1,12 +1,14 @@ a = 'le'; } } -$a = new a; +$a = new a(); var_dump($a); diff --git a/src/Threaded.php b/src/Threaded.php index 40fcccf9..2f946a04 100644 --- a/src/Threaded.php +++ b/src/Threaded.php @@ -31,7 +31,7 @@ if (!extension_loaded('pthreads')) { public function count() { - return count((array)$this); + return count((array) $this); } public function getIterator() @@ -85,7 +85,6 @@ if (!extension_loaded('pthreads')) { public function shift() { - } public function chunk($size) diff --git a/src/Volatile.php b/src/Volatile.php index 6cd483ee..cac9a337 100644 --- a/src/Volatile.php +++ b/src/Volatile.php @@ -6,7 +6,7 @@ if (!extension_loaded('pthreads')) { public function __set($offset, $value) { if ($offset === null) { - $offset = count((array)$this); + $offset = count((array) $this); } if (is_array($value)) { diff --git a/src/danog/MadelineProto/Button.php b/src/danog/MadelineProto/Button.php index 97f746eb..07697a0f 100644 --- a/src/danog/MadelineProto/Button.php +++ b/src/danog/MadelineProto/Button.php @@ -17,6 +17,7 @@ class Button extends \Volatile implements \JsonSerializable use \danog\Serializable; private $info = []; private $data = []; + public function ___construct($API, $message, $button) { $this->data = $button; diff --git a/src/danog/MadelineProto/Connection.php b/src/danog/MadelineProto/Connection.php index 38832e15..42e43803 100644 --- a/src/danog/MadelineProto/Connection.php +++ b/src/danog/MadelineProto/Connection.php @@ -162,6 +162,7 @@ class Connection extends \Volatile if (count($keys) !== count(array_unique($keys))) { throw new Bug74586Exception(); } + return $keys; } diff --git a/src/danog/MadelineProto/MTProto.php b/src/danog/MadelineProto/MTProto.php index 304780f5..d34bf324 100644 --- a/src/danog/MadelineProto/MTProto.php +++ b/src/danog/MadelineProto/MTProto.php @@ -152,7 +152,9 @@ class MTProto extends \Volatile } */ if (isset($this->data)) { - foreach ($this->data as $k => $v) { $this->{$k} = $v; } + foreach ($this->data as $k => $v) { + $this->{$k} = $v; + } unset($this->data); } $this->getting_state = false;