Code Duplication    Length = 11-11 lines in 2 locations

src/delivery/web/menu/ActionMenuItem.php 1 location

@@ 28-38 (lines=11) @@
25
        ]);
26
    }
27
28
    private function getTarget() {
29
        $target = $this->actionId;
30
        if ($this->parameters) {
31
            $keyValues = [];
32
            foreach ($this->parameters as $key => $value) {
33
                $keyValues[] = urlencode($key) . '=' . urlencode($value);
34
            }
35
            $target .= '?' . implode('&', $keyValues);
36
        }
37
        return $target;
38
    }
39
40
    private function getCaption() {
41
        return $this->caption;

src/execution/RedirectResult.php 1 location

@@ 24-34 (lines=11) @@
21
    /**
22
     * @return string
23
     */
24
    public function getUrl() {
25
        $url = $this->target;
26
        if ($this->parameters) {
27
            $keyValues = [];
28
            foreach ($this->parameters as $key => $value) {
29
                $keyValues[] = urlencode($key) . '=' . urlencode($value);
30
            }
31
            $url .= '?' . implode('&', $keyValues);
32
        }
33
        return $url;
34
    }
35
}