Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
mwebbers committed Aug 18, 2016
2 parents d5b49ad + 9fb3e1f commit 427e882
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ $jsend->isError();
$jsend->getStatus();
$jsend->setStatus($status);
$jsend->getData();
$jsend->setData($data = []);
$jsend->setData($data = null);
$jsend->getMessage();
$jsend->setMessage($message = null);
$jsend->getCode();
Expand All @@ -89,8 +89,8 @@ $jsend->send();
```

```PHP
JSend::success($data);
JSend::success($data = null);
JSend::fail($data);
JSend::error($message, $code, $data);
JSend::error($message, $code = null, $data = null);
JSend::decode($input);
```
4 changes: 2 additions & 2 deletions src/JSend.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ public static function fail(array $data)
*
* @param string $message
* @param int|null $code = null
* @param array $data = []
* @param array $data = null
* @return JSend a JSend error object with the given message, code and data.
*/
public static function error($message, $code = null, array $data = [])
public static function error($message, $code = null, array $data = null)
{
return new self(self::ERROR, $data, $message, $code);
}
Expand Down

0 comments on commit 427e882

Please sign in to comment.