UrlUtils::getResourceName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
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