@@ -6,9 +6,9 @@ |
||
6 | 6 | |
7 | 7 | abstract class VariableInfo_Renderer_String extends VariableInfo_Renderer |
8 | 8 | { |
9 | - /** |
|
10 | - * @var mixed |
|
11 | - */ |
|
9 | + /** |
|
10 | + * @var mixed |
|
11 | + */ |
|
12 | 12 | protected $value; |
13 | 13 | |
14 | 14 | protected function init() |
@@ -6,19 +6,19 @@ discard block |
||
6 | 6 | |
7 | 7 | abstract class VariableInfo_Renderer |
8 | 8 | { |
9 | - /** |
|
10 | - * @var mixed |
|
11 | - */ |
|
9 | + /** |
|
10 | + * @var mixed |
|
11 | + */ |
|
12 | 12 | protected $value; |
13 | 13 | |
14 | - /** |
|
15 | - * @var VariableInfo |
|
16 | - */ |
|
14 | + /** |
|
15 | + * @var VariableInfo |
|
16 | + */ |
|
17 | 17 | protected $info; |
18 | 18 | |
19 | - /** |
|
20 | - * @var string |
|
21 | - */ |
|
19 | + /** |
|
20 | + * @var string |
|
21 | + */ |
|
22 | 22 | protected $type; |
23 | 23 | |
24 | 24 | public function __construct(VariableInfo $info) |
@@ -31,11 +31,11 @@ discard block |
||
31 | 31 | |
32 | 32 | abstract protected function init(); |
33 | 33 | |
34 | - /** |
|
35 | - * Renders the value to the target format. |
|
36 | - * |
|
37 | - * @return mixed |
|
38 | - */ |
|
34 | + /** |
|
35 | + * Renders the value to the target format. |
|
36 | + * |
|
37 | + * @return mixed |
|
38 | + */ |
|
39 | 39 | public function render() |
40 | 40 | { |
41 | 41 | return $this->_render(); |
@@ -19,34 +19,34 @@ discard block |
||
19 | 19 | */ |
20 | 20 | class RequestHelper_Boundaries_Boundary |
21 | 21 | { |
22 | - /** |
|
23 | - * @var string |
|
24 | - */ |
|
22 | + /** |
|
23 | + * @var string |
|
24 | + */ |
|
25 | 25 | protected $content; |
26 | 26 | |
27 | - /** |
|
28 | - * @var array |
|
29 | - */ |
|
27 | + /** |
|
28 | + * @var array |
|
29 | + */ |
|
30 | 30 | protected $dispositionParams = array(); |
31 | 31 | |
32 | - /** |
|
33 | - * @var string |
|
34 | - */ |
|
32 | + /** |
|
33 | + * @var string |
|
34 | + */ |
|
35 | 35 | protected $contentType = ''; |
36 | 36 | |
37 | - /** |
|
38 | - * @var string |
|
39 | - */ |
|
37 | + /** |
|
38 | + * @var string |
|
39 | + */ |
|
40 | 40 | protected $contentEncoding = ''; |
41 | 41 | |
42 | - /** |
|
43 | - * @var RequestHelper_Boundaries |
|
44 | - */ |
|
42 | + /** |
|
43 | + * @var RequestHelper_Boundaries |
|
44 | + */ |
|
45 | 45 | protected $boundaries; |
46 | 46 | |
47 | - /** |
|
48 | - * @var string |
|
49 | - */ |
|
47 | + /** |
|
48 | + * @var string |
|
49 | + */ |
|
50 | 50 | protected $transferEncoding = ''; |
51 | 51 | |
52 | 52 | public function __construct(RequestHelper_Boundaries $boundaries, string $content) |
@@ -60,46 +60,46 @@ discard block |
||
60 | 60 | return strlen($this->content); |
61 | 61 | } |
62 | 62 | |
63 | - /** |
|
64 | - * Sets the name of the request parameter. |
|
65 | - * |
|
66 | - * @param string $name |
|
67 | - * @return RequestHelper_Boundaries_Boundary |
|
68 | - */ |
|
63 | + /** |
|
64 | + * Sets the name of the request parameter. |
|
65 | + * |
|
66 | + * @param string $name |
|
67 | + * @return RequestHelper_Boundaries_Boundary |
|
68 | + */ |
|
69 | 69 | public function setName(string $name) : RequestHelper_Boundaries_Boundary |
70 | 70 | { |
71 | 71 | return $this->setDispositionParam('name', $name); |
72 | 72 | } |
73 | 73 | |
74 | - /** |
|
75 | - * Sets the filename to use for the content, if applicable. |
|
76 | - * |
|
77 | - * @param string $fileName |
|
78 | - * @return RequestHelper_Boundaries_Boundary |
|
79 | - */ |
|
74 | + /** |
|
75 | + * Sets the filename to use for the content, if applicable. |
|
76 | + * |
|
77 | + * @param string $fileName |
|
78 | + * @return RequestHelper_Boundaries_Boundary |
|
79 | + */ |
|
80 | 80 | public function setFileName(string $fileName) : RequestHelper_Boundaries_Boundary |
81 | 81 | { |
82 | 82 | return $this->setDispositionParam('filename', $fileName); |
83 | 83 | } |
84 | 84 | |
85 | - /** |
|
86 | - * Sets the content type to use for the content. |
|
87 | - * |
|
88 | - * @param string $contentType |
|
89 | - * @return RequestHelper_Boundaries_Boundary |
|
90 | - */ |
|
85 | + /** |
|
86 | + * Sets the content type to use for the content. |
|
87 | + * |
|
88 | + * @param string $contentType |
|
89 | + * @return RequestHelper_Boundaries_Boundary |
|
90 | + */ |
|
91 | 91 | public function setContentType(string $contentType) : RequestHelper_Boundaries_Boundary |
92 | 92 | { |
93 | 93 | $this->contentType = $contentType; |
94 | 94 | return $this; |
95 | 95 | } |
96 | 96 | |
97 | - /** |
|
98 | - * Sets the encoding to specify for the content. |
|
99 | - * |
|
100 | - * @param string $encoding An encoding string, e.g. "UTF-8", "ASCII" |
|
101 | - * @return RequestHelper_Boundaries_Boundary |
|
102 | - */ |
|
97 | + /** |
|
98 | + * Sets the encoding to specify for the content. |
|
99 | + * |
|
100 | + * @param string $encoding An encoding string, e.g. "UTF-8", "ASCII" |
|
101 | + * @return RequestHelper_Boundaries_Boundary |
|
102 | + */ |
|
103 | 103 | public function setContentEncoding(string $encoding) : RequestHelper_Boundaries_Boundary |
104 | 104 | { |
105 | 105 | $this->contentEncoding = $encoding; |
@@ -119,11 +119,11 @@ discard block |
||
119 | 119 | return $this; |
120 | 120 | } |
121 | 121 | |
122 | - /** |
|
123 | - * Renders the mime boundary text. |
|
124 | - * |
|
125 | - * @return string |
|
126 | - */ |
|
122 | + /** |
|
123 | + * Renders the mime boundary text. |
|
124 | + * |
|
125 | + * @return string |
|
126 | + */ |
|
127 | 127 | public function render() |
128 | 128 | { |
129 | 129 | $eol = $this->boundaries->getEOL(); |
@@ -14,9 +14,9 @@ |
||
14 | 14 | * @see http://www.xmlsoft.org/html/libxml-xmlerror.html |
15 | 15 | */ |
16 | 16 | |
17 | - /** |
|
18 | - * @var string $list |
|
19 | - */ |
|
17 | + /** |
|
18 | + * @var string $list |
|
19 | + */ |
|
20 | 20 | $list = file_get_contents('libxmlerrors.txt'); |
21 | 21 | $outputFile = 'LibXML.php'; |
22 | 22 | $lines = explode("\n", $list); |
@@ -19,9 +19,9 @@ |
||
19 | 19 | */ |
20 | 20 | class Request_RefreshParams_Exclude_Name extends Request_RefreshParams_Exclude |
21 | 21 | { |
22 | - /** |
|
23 | - * @var string |
|
24 | - */ |
|
22 | + /** |
|
23 | + * @var string |
|
24 | + */ |
|
25 | 25 | private $name; |
26 | 26 | |
27 | 27 | public function __construct(string $paramName) |
@@ -23,14 +23,14 @@ discard block |
||
23 | 23 | { |
24 | 24 | use Traits_Optionable; |
25 | 25 | |
26 | - /** |
|
27 | - * @var array<string,mixed> |
|
28 | - */ |
|
26 | + /** |
|
27 | + * @var array<string,mixed> |
|
28 | + */ |
|
29 | 29 | private $overrides = array(); |
30 | 30 | |
31 | - /** |
|
32 | - * @var Request_RefreshParams_Exclude[] |
|
33 | - */ |
|
31 | + /** |
|
32 | + * @var Request_RefreshParams_Exclude[] |
|
33 | + */ |
|
34 | 34 | private $excludes = array(); |
35 | 35 | |
36 | 36 | public function getDefaultOptions() : array |
@@ -41,27 +41,27 @@ discard block |
||
41 | 41 | ); |
42 | 42 | } |
43 | 43 | |
44 | - /** |
|
45 | - * Whether to automatically exclude the session variable |
|
46 | - * from the parameters. |
|
47 | - * |
|
48 | - * @param bool $exclude |
|
49 | - * @return Request_RefreshParams |
|
50 | - */ |
|
44 | + /** |
|
45 | + * Whether to automatically exclude the session variable |
|
46 | + * from the parameters. |
|
47 | + * |
|
48 | + * @param bool $exclude |
|
49 | + * @return Request_RefreshParams |
|
50 | + */ |
|
51 | 51 | public function setExcludeSessionName(bool $exclude=true) : Request_RefreshParams |
52 | 52 | { |
53 | 53 | $this->setOption('exclude-session-name', $exclude); |
54 | 54 | return $this; |
55 | 55 | } |
56 | 56 | |
57 | - /** |
|
58 | - * Whether to automatically exclude the HTML_QuickForm2 |
|
59 | - * request variable used to track whether a form has been |
|
60 | - * submitted. |
|
61 | - * |
|
62 | - * @param bool $exclude |
|
63 | - * @return Request_RefreshParams |
|
64 | - */ |
|
57 | + /** |
|
58 | + * Whether to automatically exclude the HTML_QuickForm2 |
|
59 | + * request variable used to track whether a form has been |
|
60 | + * submitted. |
|
61 | + * |
|
62 | + * @param bool $exclude |
|
63 | + * @return Request_RefreshParams |
|
64 | + */ |
|
65 | 65 | public function setExcludeQuickform(bool $exclude) : Request_RefreshParams |
66 | 66 | { |
67 | 67 | $this->setOption('exclude-quickform-submitter', $exclude); |
@@ -78,20 +78,20 @@ discard block |
||
78 | 78 | return $this; |
79 | 79 | } |
80 | 80 | |
81 | - /** |
|
82 | - * Exclude a request using a callback function. |
|
83 | - * |
|
84 | - * The function gets two parameters: |
|
85 | - * |
|
86 | - * - The name of the request parameter |
|
87 | - * - The value of the request parameter |
|
88 | - * |
|
89 | - * If the callback returns a boolean true, the |
|
90 | - * parameter will be excluded. |
|
91 | - * |
|
92 | - * @param callable $callback |
|
93 | - * @return Request_RefreshParams |
|
94 | - */ |
|
81 | + /** |
|
82 | + * Exclude a request using a callback function. |
|
83 | + * |
|
84 | + * The function gets two parameters: |
|
85 | + * |
|
86 | + * - The name of the request parameter |
|
87 | + * - The value of the request parameter |
|
88 | + * |
|
89 | + * If the callback returns a boolean true, the |
|
90 | + * parameter will be excluded. |
|
91 | + * |
|
92 | + * @param callable $callback |
|
93 | + * @return Request_RefreshParams |
|
94 | + */ |
|
95 | 95 | public function excludeParamByCallback($callback) : Request_RefreshParams |
96 | 96 | { |
97 | 97 | $this->excludes[] = new Request_RefreshParams_Exclude_Callback($callback); |
@@ -99,12 +99,12 @@ discard block |
||
99 | 99 | return $this; |
100 | 100 | } |
101 | 101 | |
102 | - /** |
|
103 | - * Excludes a request parameter by name. |
|
104 | - * |
|
105 | - * @param array $paramNames |
|
106 | - * @return Request_RefreshParams |
|
107 | - */ |
|
102 | + /** |
|
103 | + * Excludes a request parameter by name. |
|
104 | + * |
|
105 | + * @param array $paramNames |
|
106 | + * @return Request_RefreshParams |
|
107 | + */ |
|
108 | 108 | public function excludeParamsByName(array $paramNames) : Request_RefreshParams |
109 | 109 | { |
110 | 110 | foreach($paramNames as $name) |
@@ -115,15 +115,15 @@ discard block |
||
115 | 115 | return $this; |
116 | 116 | } |
117 | 117 | |
118 | - /** |
|
119 | - * Overrides a parameter: even if it exists, this |
|
120 | - * value will be used instead - even if it is on |
|
121 | - * the list of excluded parameters. |
|
122 | - * |
|
123 | - * @param string $paramName |
|
124 | - * @param mixed $paramValue |
|
125 | - * @return Request_RefreshParams |
|
126 | - */ |
|
118 | + /** |
|
119 | + * Overrides a parameter: even if it exists, this |
|
120 | + * value will be used instead - even if it is on |
|
121 | + * the list of excluded parameters. |
|
122 | + * |
|
123 | + * @param string $paramName |
|
124 | + * @param mixed $paramValue |
|
125 | + * @return Request_RefreshParams |
|
126 | + */ |
|
127 | 127 | public function overrideParam(string $paramName, $paramValue) : Request_RefreshParams |
128 | 128 | { |
129 | 129 | $this->overrides[$paramName] = $paramValue; |
@@ -131,12 +131,12 @@ discard block |
||
131 | 131 | return $this; |
132 | 132 | } |
133 | 133 | |
134 | - /** |
|
135 | - * Overrides an array of parameters. |
|
136 | - * |
|
137 | - * @param array $params |
|
138 | - * @return Request_RefreshParams |
|
139 | - */ |
|
134 | + /** |
|
135 | + * Overrides an array of parameters. |
|
136 | + * |
|
137 | + * @param array $params |
|
138 | + * @return Request_RefreshParams |
|
139 | + */ |
|
140 | 140 | public function overrideParams(array $params) : Request_RefreshParams |
141 | 141 | { |
142 | 142 | foreach($params as $name => $value) |
@@ -147,14 +147,14 @@ discard block |
||
147 | 147 | return $this; |
148 | 148 | } |
149 | 149 | |
150 | - /** |
|
151 | - * Resolves all the parameter exclusions that should |
|
152 | - * be applied to the list of parameters. This includes |
|
153 | - * the manually added exclusions and the dynamic exclusions |
|
154 | - * like the session name. |
|
155 | - * |
|
156 | - * @return Request_RefreshParams_Exclude[] |
|
157 | - */ |
|
150 | + /** |
|
151 | + * Resolves all the parameter exclusions that should |
|
152 | + * be applied to the list of parameters. This includes |
|
153 | + * the manually added exclusions and the dynamic exclusions |
|
154 | + * like the session name. |
|
155 | + * |
|
156 | + * @return Request_RefreshParams_Exclude[] |
|
157 | + */ |
|
158 | 158 | private function resolveExcludes() : array |
159 | 159 | { |
160 | 160 | $excludes = $this->excludes; |
@@ -165,12 +165,12 @@ discard block |
||
165 | 165 | return $excludes; |
166 | 166 | } |
167 | 167 | |
168 | - /** |
|
169 | - * Automatically excludes the session name from the |
|
170 | - * parameters, if present. |
|
171 | - * |
|
172 | - * @param Request_RefreshParams_Exclude[] $excludes |
|
173 | - */ |
|
168 | + /** |
|
169 | + * Automatically excludes the session name from the |
|
170 | + * parameters, if present. |
|
171 | + * |
|
172 | + * @param Request_RefreshParams_Exclude[] $excludes |
|
173 | + */ |
|
174 | 174 | private function autoExcludeSessionName(array &$excludes) : void |
175 | 175 | { |
176 | 176 | if($this->getBoolOption('exclude-session-name')) |
@@ -179,12 +179,12 @@ discard block |
||
179 | 179 | } |
180 | 180 | } |
181 | 181 | |
182 | - /** |
|
183 | - * Automatically excludes the HTML_QuickForm2 submit |
|
184 | - * tracking variable, when enabled. |
|
185 | - * |
|
186 | - * @param Request_RefreshParams_Exclude[] $excludes |
|
187 | - */ |
|
182 | + /** |
|
183 | + * Automatically excludes the HTML_QuickForm2 submit |
|
184 | + * tracking variable, when enabled. |
|
185 | + * |
|
186 | + * @param Request_RefreshParams_Exclude[] $excludes |
|
187 | + */ |
|
188 | 188 | private function autoExcludeQuickform(array &$excludes) : void |
189 | 189 | { |
190 | 190 | if($this->getBoolOption('exclude-quickform-submitter')) |
@@ -196,12 +196,12 @@ discard block |
||
196 | 196 | } |
197 | 197 | } |
198 | 198 | |
199 | - /** |
|
200 | - * Retrieves the list of parameters matching the |
|
201 | - * current settings. |
|
202 | - * |
|
203 | - * @return array<string,mixed> |
|
204 | - */ |
|
199 | + /** |
|
200 | + * Retrieves the list of parameters matching the |
|
201 | + * current settings. |
|
202 | + * |
|
203 | + * @return array<string,mixed> |
|
204 | + */ |
|
205 | 205 | public function getParams() : array |
206 | 206 | { |
207 | 207 | $params = $this->removeExcluded($_REQUEST); |
@@ -217,12 +217,12 @@ discard block |
||
217 | 217 | return $params; |
218 | 218 | } |
219 | 219 | |
220 | - /** |
|
221 | - * Removes all excluded parameters from the array. |
|
222 | - * |
|
223 | - * @param array<string,mixed> $params |
|
224 | - * @return array<string,mixed> |
|
225 | - */ |
|
220 | + /** |
|
221 | + * Removes all excluded parameters from the array. |
|
222 | + * |
|
223 | + * @param array<string,mixed> $params |
|
224 | + * @return array<string,mixed> |
|
225 | + */ |
|
226 | 226 | private function removeExcluded(array $params) : array |
227 | 227 | { |
228 | 228 | $result = array(); |
@@ -240,14 +240,14 @@ discard block |
||
240 | 240 | return $result; |
241 | 241 | } |
242 | 242 | |
243 | - /** |
|
244 | - * Checks all configured exclusions to see if the |
|
245 | - * parameter should be excluded or not. |
|
246 | - * |
|
247 | - * @param string $paramName |
|
248 | - * @param mixed $paramValue |
|
249 | - * @return bool |
|
250 | - */ |
|
243 | + /** |
|
244 | + * Checks all configured exclusions to see if the |
|
245 | + * parameter should be excluded or not. |
|
246 | + * |
|
247 | + * @param string $paramName |
|
248 | + * @param mixed $paramValue |
|
249 | + * @return bool |
|
250 | + */ |
|
251 | 251 | public function isExcluded(string $paramName, $paramValue) : bool |
252 | 252 | { |
253 | 253 | $excludes = $this->resolveExcludes(); |
@@ -19,51 +19,51 @@ discard block |
||
19 | 19 | */ |
20 | 20 | class RequestHelper_Response |
21 | 21 | { |
22 | - /** |
|
23 | - * @var RequestHelper |
|
24 | - */ |
|
22 | + /** |
|
23 | + * @var RequestHelper |
|
24 | + */ |
|
25 | 25 | protected $request; |
26 | 26 | |
27 | - /** |
|
28 | - * @var string |
|
29 | - */ |
|
27 | + /** |
|
28 | + * @var string |
|
29 | + */ |
|
30 | 30 | protected $body = ''; |
31 | 31 | |
32 | - /** |
|
33 | - * @var array |
|
34 | - */ |
|
32 | + /** |
|
33 | + * @var array |
|
34 | + */ |
|
35 | 35 | protected $info; |
36 | 36 | |
37 | - /** |
|
38 | - * @var bool |
|
39 | - */ |
|
37 | + /** |
|
38 | + * @var bool |
|
39 | + */ |
|
40 | 40 | protected $isError = false; |
41 | 41 | |
42 | - /** |
|
43 | - * @var string |
|
44 | - */ |
|
42 | + /** |
|
43 | + * @var string |
|
44 | + */ |
|
45 | 45 | protected $errorMessage = ''; |
46 | 46 | |
47 | - /** |
|
48 | - * @var integer |
|
49 | - */ |
|
47 | + /** |
|
48 | + * @var integer |
|
49 | + */ |
|
50 | 50 | protected $errorCode = 0; |
51 | 51 | |
52 | - /** |
|
53 | - * @param RequestHelper $helper |
|
54 | - * @param array $info The CURL info array from curl_getinfo(). |
|
55 | - */ |
|
52 | + /** |
|
53 | + * @param RequestHelper $helper |
|
54 | + * @param array $info The CURL info array from curl_getinfo(). |
|
55 | + */ |
|
56 | 56 | public function __construct(RequestHelper $helper, array $info) |
57 | 57 | { |
58 | 58 | $this->request = $helper; |
59 | 59 | $this->info = $info; |
60 | 60 | } |
61 | 61 | |
62 | - /** |
|
63 | - * Retrieves the request instance that initiated the request. |
|
64 | - * |
|
65 | - * @return RequestHelper |
|
66 | - */ |
|
62 | + /** |
|
63 | + * Retrieves the request instance that initiated the request. |
|
64 | + * |
|
65 | + * @return RequestHelper |
|
66 | + */ |
|
67 | 67 | public function getRequest() : RequestHelper |
68 | 68 | { |
69 | 69 | return $this->request; |
@@ -84,79 +84,79 @@ discard block |
||
84 | 84 | return $this; |
85 | 85 | } |
86 | 86 | |
87 | - /** |
|
88 | - * Whether an error occurred in the request. |
|
89 | - * @return bool |
|
90 | - */ |
|
87 | + /** |
|
88 | + * Whether an error occurred in the request. |
|
89 | + * @return bool |
|
90 | + */ |
|
91 | 91 | public function isError() : bool |
92 | 92 | { |
93 | 93 | return $this->isError; |
94 | 94 | } |
95 | 95 | |
96 | - /** |
|
97 | - * Whether the request timed out. |
|
98 | - * @return bool |
|
99 | - */ |
|
96 | + /** |
|
97 | + * Whether the request timed out. |
|
98 | + * @return bool |
|
99 | + */ |
|
100 | 100 | public function isTimeout() : bool |
101 | 101 | { |
102 | 102 | return $this->errorCode === RequestHelper_CURL::OPERATION_TIMEDOUT; |
103 | 103 | } |
104 | 104 | |
105 | - /** |
|
106 | - * Retrieves the native error message, if an error occurred. |
|
107 | - * @return string |
|
108 | - */ |
|
105 | + /** |
|
106 | + * Retrieves the native error message, if an error occurred. |
|
107 | + * @return string |
|
108 | + */ |
|
109 | 109 | public function getErrorMessage() : string |
110 | 110 | { |
111 | 111 | return $this->errorMessage; |
112 | 112 | } |
113 | 113 | |
114 | - /** |
|
115 | - * Retrieves the native CURL error code, if an error occurred. |
|
116 | - * @return int |
|
117 | - * @see RequestHelper_CURL For a list of error codes. |
|
118 | - */ |
|
114 | + /** |
|
115 | + * Retrieves the native CURL error code, if an error occurred. |
|
116 | + * @return int |
|
117 | + * @see RequestHelper_CURL For a list of error codes. |
|
118 | + */ |
|
119 | 119 | public function getErrorCode() : int |
120 | 120 | { |
121 | 121 | return $this->errorCode; |
122 | 122 | } |
123 | 123 | |
124 | - /** |
|
125 | - * Retrieves the full body of the request. |
|
126 | - * |
|
127 | - * @return string |
|
128 | - */ |
|
124 | + /** |
|
125 | + * Retrieves the full body of the request. |
|
126 | + * |
|
127 | + * @return string |
|
128 | + */ |
|
129 | 129 | public function getRequestBody() : string |
130 | 130 | { |
131 | 131 | return $this->request->getBody(); |
132 | 132 | } |
133 | 133 | |
134 | - /** |
|
135 | - * Retrieves the body of the response, if any. |
|
136 | - * |
|
137 | - * @return string |
|
138 | - */ |
|
134 | + /** |
|
135 | + * Retrieves the body of the response, if any. |
|
136 | + * |
|
137 | + * @return string |
|
138 | + */ |
|
139 | 139 | public function getResponseBody() : string |
140 | 140 | { |
141 | 141 | return $this->body; |
142 | 142 | } |
143 | 143 | |
144 | - /** |
|
145 | - * The response HTTP code. |
|
146 | - * |
|
147 | - * @return int The code, or 0 if none was sent (on error). |
|
148 | - */ |
|
144 | + /** |
|
145 | + * The response HTTP code. |
|
146 | + * |
|
147 | + * @return int The code, or 0 if none was sent (on error). |
|
148 | + */ |
|
149 | 149 | public function getCode() : int |
150 | 150 | { |
151 | 151 | return intval($this->getInfoKey('http_code')); |
152 | 152 | } |
153 | 153 | |
154 | - /** |
|
155 | - * Retrieves the actual headers that were sent in the request: |
|
156 | - * one header by entry in the indexed array. |
|
157 | - * |
|
158 | - * @return array |
|
159 | - */ |
|
154 | + /** |
|
155 | + * Retrieves the actual headers that were sent in the request: |
|
156 | + * one header by entry in the indexed array. |
|
157 | + * |
|
158 | + * @return array |
|
159 | + */ |
|
160 | 160 | public function getHeaders() : array |
161 | 161 | { |
162 | 162 | return ConvertHelper::explodeTrim("\n", $this->getInfoKey('request_header')); |
@@ -110,38 +110,38 @@ discard block |
||
110 | 110 | return $this; |
111 | 111 | } |
112 | 112 | |
113 | - /** |
|
114 | - * Whether to enable sorting the URLs alphabetically (disabled by default). |
|
115 | - * |
|
116 | - * @param bool $enabled |
|
117 | - * @return $this |
|
118 | - */ |
|
113 | + /** |
|
114 | + * Whether to enable sorting the URLs alphabetically (disabled by default). |
|
115 | + * |
|
116 | + * @param bool $enabled |
|
117 | + * @return $this |
|
118 | + */ |
|
119 | 119 | public function enableSorting(bool $enabled=true) : ConvertHelper_URLFinder |
120 | 120 | { |
121 | 121 | $this->setOption('sorting', $enabled); |
122 | 122 | return $this; |
123 | 123 | } |
124 | 124 | |
125 | - /** |
|
126 | - * Whether to include email addresses in the search. |
|
127 | - * This is only relevant when using the getURLs() |
|
128 | - * method. |
|
129 | - * |
|
130 | - * @param bool $include |
|
131 | - * @return ConvertHelper_URLFinder |
|
132 | - */ |
|
125 | + /** |
|
126 | + * Whether to include email addresses in the search. |
|
127 | + * This is only relevant when using the getURLs() |
|
128 | + * method. |
|
129 | + * |
|
130 | + * @param bool $include |
|
131 | + * @return ConvertHelper_URLFinder |
|
132 | + */ |
|
133 | 133 | public function includeEmails(bool $include=true) : ConvertHelper_URLFinder |
134 | 134 | { |
135 | 135 | $this->setOption('include-emails', $include); |
136 | 136 | return $this; |
137 | 137 | } |
138 | 138 | |
139 | - /** |
|
140 | - * Whether to omit the mailto: that is automatically added to all email addresses. |
|
141 | - * |
|
142 | - * @param bool $omit |
|
143 | - * @return ConvertHelper_URLFinder |
|
144 | - */ |
|
139 | + /** |
|
140 | + * Whether to omit the mailto: that is automatically added to all email addresses. |
|
141 | + * |
|
142 | + * @param bool $omit |
|
143 | + * @return ConvertHelper_URLFinder |
|
144 | + */ |
|
145 | 145 | public function omitMailto(bool $omit=true) : ConvertHelper_URLFinder |
146 | 146 | { |
147 | 147 | $this->setOption('omit-mailto', $omit); |
@@ -267,11 +267,11 @@ discard block |
||
267 | 267 | ); |
268 | 268 | } |
269 | 269 | |
270 | - /** |
|
271 | - * Fetches all URLs that can be found in the subject string. |
|
272 | - * |
|
273 | - * @return string[] |
|
274 | - */ |
|
270 | + /** |
|
271 | + * Fetches all URLs that can be found in the subject string. |
|
272 | + * |
|
273 | + * @return string[] |
|
274 | + */ |
|
275 | 275 | public function getURLs() : array |
276 | 276 | { |
277 | 277 | $this->parse(); |
@@ -474,13 +474,13 @@ discard block |
||
474 | 474 | return array_pop($parts); |
475 | 475 | } |
476 | 476 | |
477 | - /** |
|
478 | - * Retrieves all email addresses from the subject string. |
|
479 | - * |
|
480 | - * @return string[] |
|
481 | - * |
|
482 | - * @see omitMailto() |
|
483 | - */ |
|
477 | + /** |
|
478 | + * Retrieves all email addresses from the subject string. |
|
479 | + * |
|
480 | + * @return string[] |
|
481 | + * |
|
482 | + * @see omitMailto() |
|
483 | + */ |
|
484 | 484 | public function getEmails() : array |
485 | 485 | { |
486 | 486 | $this->parse(); |
@@ -506,11 +506,11 @@ discard block |
||
506 | 506 | return $result; |
507 | 507 | } |
508 | 508 | |
509 | - /** |
|
510 | - * Retrieves all URLs as URLInfo instances. |
|
511 | - * |
|
512 | - * @return URLInfo[] |
|
513 | - */ |
|
509 | + /** |
|
510 | + * Retrieves all URLs as URLInfo instances. |
|
511 | + * |
|
512 | + * @return URLInfo[] |
|
513 | + */ |
|
514 | 514 | public function getInfos() : array |
515 | 515 | { |
516 | 516 | $this->parse(); |
@@ -25,10 +25,10 @@ |
||
25 | 25 | * |
26 | 26 | * @return string |
27 | 27 | */ |
28 | - function render() : string; |
|
28 | + function render() : string; |
|
29 | 29 | |
30 | 30 | /** |
31 | 31 | * Renders the string and echos it. |
32 | 32 | */ |
33 | - function display() : void; |
|
33 | + function display() : void; |
|
34 | 34 | } |