Skip to content

Commit

Permalink
NBTStream: Use default values instead of redundant constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
dktapps committed Feb 14, 2018
1 parent 9d1be24 commit e88526a
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/NBTStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
*/
abstract class NBTStream{

public $buffer;
public $offset;
public $buffer = "";
public $offset = 0;
private $data;

public function get($len) : string{
Expand All @@ -65,11 +65,6 @@ public function feof() : bool{
return !isset($this->buffer{$this->offset});
}

public function __construct(){
$this->offset = 0;
$this->buffer = "";
}

public function read(string $buffer, bool $doMultiple = false) : void{
$this->offset = 0;
$this->buffer = $buffer;
Expand Down

0 comments on commit e88526a

Please sign in to comment.