We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2c6f5ea commit 1f855e7Copy full SHA for 1f855e7
src/Buffertools/Parser.php
@@ -30,14 +30,12 @@ class Parser
30
*/
31
public function __construct(BufferInterface $input = null)
32
{
33
- $this->position = 0;
34
-
35
- if (null === $input) {
36
- $this->string = '';
37
- $this->size = 0;
38
- } else {
+ if ($input instanceof BufferInterface) {
39
$this->string = $input->getBinary();
40
$this->size = $input->getSize();
+ } else {
+ $this->string = '';
+ $this->size = 0;
41
}
42
43
0 commit comments