Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell authored and bert-w committed Apr 29, 2021
1 parent 83b2136 commit 793d11a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/Illuminate/Http/JsonResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class JsonResponse extends BaseJsonResponse
* @param int $status
* @param array $headers
* @param int $options
* @param bool $json
* @param bool $json
* @return void
*/
public function __construct($data = null, $status = 200, $headers = [], $options = 0, $json = false)
Expand All @@ -32,6 +32,14 @@ public function __construct($data = null, $status = 200, $headers = [], $options
parent::__construct($data, $status, $headers, $json);
}

/**
* {@inheritdoc}
*/
public static function fromJsonString(?string $data = null, int $status = 200, array $headers = [])
{
return new static($data, $status, $headers, 0, true);
}

/**
* Sets the JSONP callback.
*
Expand Down Expand Up @@ -119,12 +127,4 @@ public function hasEncodingOption($option)
{
return (bool) ($this->encodingOptions & $option);
}

/**
* {@inheritdoc}
*/
public static function fromJsonString(?string $data = null, int $status = 200, array $headers = [])
{
return new static($data, $status, $headers, 0, true);
}
}

0 comments on commit 793d11a

Please sign in to comment.