Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos in documentation #43

Merged
merged 1 commit into from
Nov 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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