Skip to content
This repository was archived by the owner on Jan 23, 2019. It is now read-only.

Commit 15ed0e2

Browse files
committed
update curl tool class
1 parent 1c1182f commit 15ed0e2

File tree

2 files changed

+444
-171
lines changed

2 files changed

+444
-171
lines changed

src/io/Output.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Output
2626
/**
2727
* @var array
2828
*/
29-
private $bodys = [];
29+
private $body = [];
3030

3131
public function __construct(array $config = [])
3232
{
@@ -40,7 +40,7 @@ public function header($name, $value)
4040

4141
public function write($content)
4242
{
43-
$this->bodys[] = $content;
43+
$this->body[] = $content;
4444

4545
return $this;
4646
}
@@ -59,7 +59,7 @@ public function send($content = '')
5959
header($_SERVER['SERVER_PROTOCOL'] . ' 200 OK');
6060
header('Content-type: text/html; charset=' . $this->charset);
6161

62-
$content = implode('', $this->bodys);
62+
$content = implode('', $this->body);
6363

6464
if ( !$content ) {
6565
throw new \RuntimeException('No content to display.');
@@ -91,7 +91,7 @@ public function json(array $data)
9191

9292
public function formatJson($data, $code = 0, $msg = '')
9393
{
94-
// if `$data` is integer, queals to `formatJson(int $code, string $msg )`
94+
// if `$data` is integer, equals to `formatJson(int $code, string $msg )`
9595
if ( is_numeric($data) ) {
9696
$jsonData = [
9797
'code' => (int)$data,

0 commit comments

Comments
 (0)