X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2Fhttp%2FUrl.php;h=fe87088f28afee2a5ab4c541d2e95884846f1c9c;hb=20ba77a2dc59d3a8d0cb1666267724bad864f62d;hp=260231c6f1b97b9761762bdff0bfdb0c5f1ebf17;hpb=fb1b182fbf0ee5afed586f77eec84d7a906831ef;p=github%2Fshaarli%2FShaarli.git diff --git a/application/http/Url.php b/application/http/Url.php index 260231c6..fe87088f 100644 --- a/application/http/Url.php +++ b/application/http/Url.php @@ -17,7 +17,7 @@ namespace Shaarli\Http; */ class Url { - private static $annoyingQueryParams = array( + private static $annoyingQueryParams = [ // Facebook 'action_object_map=', 'action_ref_map=', @@ -37,15 +37,15 @@ class Url // Other 'campaign_' - ); + ]; - private static $annoyingFragments = array( + private static $annoyingFragments = [ // ATInternet 'xtor=RSS-', // Misc. 'tk.rss_all' - ); + ]; /* * URL parts represented as an array @@ -120,7 +120,7 @@ class Url foreach (self::$annoyingQueryParams as $annoying) { foreach ($queryParams as $param) { if (startsWith($param, $annoying)) { - $queryParams = array_diff($queryParams, array($param)); + $queryParams = array_diff($queryParams, [$param]); continue; } } @@ -206,7 +206,7 @@ class Url } /** - * Test if the Url is an HTTP one. + * Test if the UrlUtils is an HTTP one. * * @return true is HTTP, false otherwise. */