Passed
Push — master ( 39a14a...98f505 )
by Scrutinizer
01:35
created

ConfigStaticMethods   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A isUrlProtocolHttp() 0 5 1
1
<?php
2
3
/**
4
 * Define static methods/properties.
5
 */
6
7
declare(strict_types=1);
8
9
namespace KEINOS\MSTDN_TOOLS;
10
11
class ConfigStaticMethods extends ConfigConstants
12
{
13
    /**
14
     * Checks if the URL protocol is "http:".
15
     *
16
     * @param  string $url
17
     * @return bool
18
     */
19
    public static function isUrlProtocolHttp(string $url): bool
20
    {
21
        $target = 'http:';
22
23
        return ($target === substr($url, 0, strlen($target)));
24
    }
25
}
26