Skip to content

Commit

Permalink
Merge pull request #43 from yadaiio/typos
Browse files Browse the repository at this point in the history
Fix typos in documentation
  • Loading branch information
clue authored Nov 4, 2023
2 parents c11d91a + a6f6e30 commit 8788a78
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/EventSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ private function request()
return;
}

// match `Content-Type: text/event-stream` (case insensitve and ignore additional parameters)
// match `Content-Type: text/event-stream` (case insensitive and ignore additional parameters)
if (!preg_match('/^text\/event-stream(?:$|;)/i', $response->getHeaderLine('Content-Type'))) {
$this->readyState = self::CLOSED;
$this->emit('error', array(new \UnexpectedValueException('Unexpected Content-Type')));
Expand Down
8 changes: 4 additions & 4 deletions tests/MessageEventTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ public function testParseDataOverTwoLinesWillBeCombined()
$this->assertEquals("hello\nworld", $message->data);
}

public function testParseDataOverTwoLinesWithCarrigeReturnsWillBeCombinedWithNewline()
public function testParseDataOverTwoLinesWithCarriageReturnsWillBeCombinedWithNewline()
{
$message = MessageEvent::parse("data: hello\rdata: world", '');

$this->assertEquals("hello\nworld", $message->data);
}

public function testParseDataOverTwoLinesWithCarrigeReturnsAndNewlinesWillBeCombinedWithNewline()
public function testParseDataOverTwoLinesWithCarriageReturnsAndNewlinesWillBeCombinedWithNewline()
{
$message = MessageEvent::parse("data: hello\r\ndata: world", '');

Expand All @@ -42,14 +42,14 @@ public function testParseDataWithTrailingNewlineOverTwoLines()
$this->assertEquals("hello\n", $message->data);
}

public function testParseDataWithCarrigeReturnOverTwoLines()
public function testParseDataWithCarriageReturnOverTwoLines()
{
$message = MessageEvent::parse("data: hello\rdata:", '');

$this->assertEquals("hello\n", $message->data);
}

public function testParseDataWithCarrigeReturnAndNewlineOverTwoLines()
public function testParseDataWithCarriageReturnAndNewlineOverTwoLines()
{
$message = MessageEvent::parse("data: hello\r\ndata:", '');

Expand Down

0 comments on commit 8788a78

Please sign in to comment.