Completed
Push — master ( 93bd80...c62968 )
by Nekrasov
01:18
created

Helpers   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A startsWith() 0 4 1
1
<?php
2
3
namespace Arrilot\BitrixModels;
4
5
class Helpers
6
{
7
    /**
8
     * Does the $haystack starts with $needle
9
     *
10
     * @param $haystack
11
     * @param $needle
12
     * @return bool
13
     */
14
    public static function startsWith($haystack, $needle)
15
    {
16
        return strncmp($haystack, $needle, strlen($needle)) === 0;
17
    }
18
}
19