Skip to content

Commit

Permalink
Make Parser methods instead of class final
Browse files Browse the repository at this point in the history
  • Loading branch information
kelunik committed Jun 5, 2017
1 parent b553a46 commit 6eb83c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Amp\InvalidYieldError;

final class Parser {
class Parser {
/** @var \Generator */
private $generator;

Expand Down Expand Up @@ -49,12 +49,12 @@ public function __construct(\Generator $generator) {
*
* @return string
*/
public function cancel(): string {
final public function cancel(): string {
$this->generator = null;
return $this->buffer;
}

public function push(string $data) {
final public function push(string $data) {
if ($this->generator === null) {
throw new StreamException("The parser is no longer writable");
}
Expand Down

0 comments on commit 6eb83c1

Please sign in to comment.