Total Complexity | 5 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class Stringy |
||
11 | { |
||
12 | |||
13 | private static function _value($value, $default = '') |
||
16 | } |
||
17 | |||
18 | /** |
||
19 | * @param string $str |
||
20 | * @param string $substr |
||
21 | * |
||
22 | * @return bool |
||
23 | */ |
||
24 | public static function contains($str, $substr) |
||
25 | { |
||
26 | return false !== strpos(self::_value($str), self::_value($substr)); |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * @param string $str |
||
31 | * @param string $substr |
||
32 | * |
||
33 | * @return bool |
||
34 | */ |
||
35 | public static function endsWith($str, $substr) |
||
45 | } |
||
46 | |||
48 |