:octocat: change classnames to "self" on several returns

This commit is contained in:
codemasher
2021-11-18 13:01:46 +01:00
parent 51cb15c0d6
commit 17d0bc0dd9
8 changed files with 38 additions and 38 deletions
+3 -3
View File
@@ -44,7 +44,7 @@ final class BitBuffer{
/**
* clears the buffer
*/
public function clear():BitBuffer{
public function clear():self{
$this->buffer = [];
$this->length = 0;
@@ -54,7 +54,7 @@ final class BitBuffer{
/**
* appends a sequence of bits
*/
public function put(int $num, int $length):BitBuffer{
public function put(int $num, int $length):self{
for($i = 0; $i < $length; $i++){
$this->putBit((($num >> ($length - $i - 1)) & 1) === 1);
@@ -66,7 +66,7 @@ final class BitBuffer{
/**
* appends a single bit
*/
public function putBit(bool $bit):BitBuffer{
public function putBit(bool $bit):self{
$bufIndex = (int)floor($this->length / 8);
if(count($this->buffer) <= $bufIndex){