diff options
author | VirtualTam <virtualtam@flibidi.net> | 2018-10-13 00:19:03 +0200 |
---|---|---|
committer | VirtualTam <virtualtam@flibidi.net> | 2018-12-02 22:39:16 +0100 |
commit | f211e417bf637b8a83988175c29ee072c69f7642 (patch) | |
tree | c33378b38ff1bd16e90934b5c60467a7e0395f53 /application/Url.php | |
parent | 04ec8fedd91642d4c0fc96258868086b8a51c899 (diff) | |
download | Shaarli-f211e417bf637b8a83988175c29ee072c69f7642.tar.gz Shaarli-f211e417bf637b8a83988175c29ee072c69f7642.tar.zst Shaarli-f211e417bf637b8a83988175c29ee072c69f7642.zip |
lint: apply phpcbf to application/
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'application/Url.php')
-rw-r--r-- | application/Url.php | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/application/Url.php b/application/Url.php index 6b9870f0..3b7f19c2 100644 --- a/application/Url.php +++ b/application/Url.php | |||
@@ -34,8 +34,8 @@ function unparse_url($parsedUrl) | |||
34 | */ | 34 | */ |
35 | function cleanup_url($url) | 35 | function cleanup_url($url) |
36 | { | 36 | { |
37 | $obj_url = new Url($url); | 37 | $obj_url = new Url($url); |
38 | return $obj_url->cleanup(); | 38 | return $obj_url->cleanup(); |
39 | } | 39 | } |
40 | 40 | ||
41 | /** | 41 | /** |
@@ -47,8 +47,8 @@ function cleanup_url($url) | |||
47 | */ | 47 | */ |
48 | function get_url_scheme($url) | 48 | function get_url_scheme($url) |
49 | { | 49 | { |
50 | $obj_url = new Url($url); | 50 | $obj_url = new Url($url); |
51 | return $obj_url->getScheme(); | 51 | return $obj_url->getScheme(); |
52 | } | 52 | } |
53 | 53 | ||
54 | /** | 54 | /** |
@@ -217,7 +217,7 @@ class Url | |||
217 | } | 217 | } |
218 | 218 | ||
219 | $this->parts['query'] = implode('&', $queryParams); | 219 | $this->parts['query'] = implode('&', $queryParams); |
220 | } | 220 | } |
221 | 221 | ||
222 | /** | 222 | /** |
223 | * Removes undesired fragments | 223 | * Removes undesired fragments |
@@ -269,7 +269,8 @@ class Url | |||
269 | * | 269 | * |
270 | * @return string the URL scheme or false if none is provided. | 270 | * @return string the URL scheme or false if none is provided. |
271 | */ | 271 | */ |
272 | public function getScheme() { | 272 | public function getScheme() |
273 | { | ||
273 | if (!isset($this->parts['scheme'])) { | 274 | if (!isset($this->parts['scheme'])) { |
274 | return false; | 275 | return false; |
275 | } | 276 | } |
@@ -281,7 +282,8 @@ class Url | |||
281 | * | 282 | * |
282 | * @return string the URL host or false if none is provided. | 283 | * @return string the URL host or false if none is provided. |
283 | */ | 284 | */ |
284 | public function getHost() { | 285 | public function getHost() |
286 | { | ||
285 | if (empty($this->parts['host'])) { | 287 | if (empty($this->parts['host'])) { |
286 | return false; | 288 | return false; |
287 | } | 289 | } |
@@ -293,7 +295,8 @@ class Url | |||
293 | * | 295 | * |
294 | * @return true is HTTP, false otherwise. | 296 | * @return true is HTTP, false otherwise. |
295 | */ | 297 | */ |
296 | public function isHttp() { | 298 | public function isHttp() |
299 | { | ||
297 | return strpos(strtolower($this->parts['scheme']), 'http') !== false; | 300 | return strpos(strtolower($this->parts['scheme']), 'http') !== false; |
298 | } | 301 | } |
299 | } | 302 | } |