helper.php ➔ startsWith()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * @param $string
4
 * @param $startString
5
 * @return bool
6
 */
7
function startsWith($string, $startString)
8
{
9
    $len = strlen($startString);
10
    return (substr($string, 0, $len) === $startString);
11
}
12