| Conditions | 4 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function httpStatusCode(int $code = null, array $args = null): object |
||
| 17 | { |
||
| 18 | $httpStatus = new HttpStatus($code); |
||
| 19 | $httpStatus->code = $code; |
||
| 20 | |||
| 21 | if ( ! is_null($args)) { |
||
| 22 | foreach ($args as $key => $value) { |
||
| 23 | if (property_exists($httpStatus, $key)) $httpStatus->$key = $value; |
||
| 24 | } |
||
| 25 | } |
||
| 26 | |||
| 27 | return $httpStatus; |
||
| 28 | } |
||
| 31 |