@@ -57,7 +57,7 @@ |
||
| 57 | 57 | |
| 58 | 58 | /** |
| 59 | 59 | * @param string[] ...$relation_names any list of relations to return |
| 60 | - * @return instance of Entity object |
|
| 60 | + * @return Entity of Entity object |
|
| 61 | 61 | */ |
| 62 | 62 | public function with(string ...$relation_names) |
| 63 | 63 | { |
@@ -157,6 +157,7 @@ discard block |
||
| 157 | 157 | |
| 158 | 158 | /** |
| 159 | 159 | * @throws InvalidUrl |
| 160 | + * @param string $view |
|
| 160 | 161 | */ |
| 161 | 162 | public function view($view): string |
| 162 | 163 | { |
@@ -203,6 +204,9 @@ discard block |
||
| 203 | 204 | $this->template = "{$template}.{$this->type}"; |
| 204 | 205 | } |
| 205 | 206 | |
| 207 | + /** |
|
| 208 | + * @param string $url |
|
| 209 | + */ |
|
| 206 | 210 | private function templateFromUrl(?string $url = null): string |
| 207 | 211 | { |
| 208 | 212 | $parts = \explode('/', $url); |
@@ -10,10 +10,10 @@ discard block |
||
| 10 | 10 | abstract class Response |
| 11 | 11 | { |
| 12 | 12 | public static $code_to_message = [ |
| 13 | - // Informational 1xx |
|
| 13 | + // Informational 1xx |
|
| 14 | 14 | 100 => 'Continue', |
| 15 | 15 | 101 => 'Switching Protocols', |
| 16 | - // Successful 2xx |
|
| 16 | + // Successful 2xx |
|
| 17 | 17 | 200 => 'OK', |
| 18 | 18 | 201 => 'Created', |
| 19 | 19 | 202 => 'Accepted', |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | 204 => 'No Content', |
| 22 | 22 | 205 => 'Reset Content', |
| 23 | 23 | 206 => 'Partial Content', |
| 24 | - // Redirection 3xx |
|
| 24 | + // Redirection 3xx |
|
| 25 | 25 | 300 => 'Multiple Choices', |
| 26 | 26 | 301 => 'Moved Permanently', |
| 27 | 27 | 302 => 'Found', |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | 304 => 'Not Modified', |
| 30 | 30 | 305 => 'Use Proxy', |
| 31 | 31 | 307 => 'Temporary Redirect', |
| 32 | - // Client Error 4xx |
|
| 32 | + // Client Error 4xx |
|
| 33 | 33 | 400 => 'Bad Request', |
| 34 | 34 | 401 => 'Unauthorized', |
| 35 | 35 | 402 => 'Payment Required', |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | 415 => 'Unsupported Media Type', |
| 49 | 49 | 416 => 'Requested Range Not Satisfiable', |
| 50 | 50 | 417 => 'Expectation Failed', |
| 51 | - // Server Error 5xx |
|
| 51 | + // Server Error 5xx |
|
| 52 | 52 | 500 => 'Internal Server Error', |
| 53 | 53 | 501 => 'Not Implemented', |
| 54 | 54 | 502 => 'Bad Gateway', |