UrlUtils   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 22
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getResourceName() 0 3 1
A stripResourceName() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Rico\Lib;
6
7
use Rico\Slib\UrlUtils as StaticUrlUtils;
8
9
class UrlUtils
10
{
11
    /**
12
     * Gets the name of a resource (image, pdf, …) out of an $url.
13
     *
14
     * @param string $url
15
     *
16
     * @return string
17
     */
18
    public function getResourceName(string $url): string
19
    {
20
        return StaticUrlUtils::getResourceName($url);
21
    }
22
23
    /** Gets the URL without the resource (image, pdf, …).
24
     * @param string $url
25
     *
26
     * @return string
27
     */
28
    public function stripResourceName(string $url): string
29
    {
30
        return StaticUrlUtils::stripResourceName($url);
31
    }
32
}
33