Completed
Push — 2.2 ( 2d418d...f846f2 )
by
unknown
01:23
created

UtilsHelper   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 18
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A endsWith() 0 9 2
1
<?php
2
3
namespace Wabel\Zoho\CRM\Helpers;
4
5
class UtilsHelper
6
{
7
8
    /**
9
     * @param string $haystack
10
     * @param string $needle
11
     * @return bool
12
     */
13
    public static function endsWith($haystack, $needle)
14
    {
15
        $length = strlen($needle);
16
        if ($length === 0) {
17
            return true;
18
        }
19
20
        return (substr($haystack, -$length) === $needle);
21
    }
22
}
23