Skip to content

Commit ec814d2

Browse files
authored
Merge pull request #6 from harryosmar/access-modif-attr-changes
update class attribute access modifier
2 parents b543a07 + b02f1d9 commit ec814d2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Response.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Response implements PhpRestfulApiResponse
3131
*
3232
* @var array
3333
*/
34-
private $phrases = [
34+
protected $phrases = [
3535
// INFORMATIONAL CODES
3636
100 => 'Continue',
3737
101 => 'Switching Protocols',
@@ -108,17 +108,17 @@ class Response implements PhpRestfulApiResponse
108108
/**
109109
* @var string
110110
*/
111-
private $reasonPhrase = '';
111+
protected $reasonPhrase = '';
112112

113113
/**
114114
* @var int
115115
*/
116-
private $statusCode;
116+
protected $statusCode;
117117

118118
/**
119119
* @var int|string
120120
*/
121-
private $errorCode;
121+
protected $errorCode;
122122

123123
/**
124124
* Response constructor.
@@ -407,7 +407,7 @@ public function setErrorCode($errorCode)
407407
* @param int $statusCode
408408
* @throws InvalidArgumentException on an invalid status code.
409409
*/
410-
private function setStatusCode(int $statusCode)
410+
protected function setStatusCode(int $statusCode)
411411
{
412412
if ($statusCode < static::MIN_STATUS_CODE_VALUE
413413
|| $statusCode > static::MAX_STATUS_CODE_VALUE
@@ -429,7 +429,7 @@ private function setStatusCode(int $statusCode)
429429
* @return string
430430
* @throws InvalidArgumentException if unable to encode the $data to JSON.
431431
*/
432-
private function jsonEncode($data)
432+
protected function jsonEncode($data)
433433
{
434434
if (is_resource($data)) {
435435
throw new InvalidArgumentException('Cannot JSON encode resources');

0 commit comments

Comments
 (0)