Issues (107)

src/App/Logic/helpers.php (1 issue)

Labels
Severity
1
<?php
2
3
if (!function_exists('showCleanRoutUrl')) {
4
    /**
5
     * Clean the url for the front end to display.
6
     *
7
     * @param string $link
8
     *
9
     * @return echo string
0 ignored issues
show
The type echo was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
10
     */
11
    function showCleanRoutUrl($link)
12
    {
13
        $parsedUrl = parse_url($link);
14
        $routeUrl = '';
15
        if (isset($parsedUrl['path'])) {
16
            $routeUrl .= $parsedUrl['path'];
17
        }
18
        if (isset($parsedUrl['query'])) {
19
            $routeUrl .= '?'.$parsedUrl['query'];
20
        }
21
        echo $routeUrl;
22
    }
23
}
24