| Total Complexity | 6 |
| Total Lines | 56 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | trait Utilities |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @utilities @isEmail |
||
| 9 | * check if the value is valid email |
||
| 10 | * |
||
| 11 | * @param string $value |
||
| 12 | * |
||
| 13 | * @return bool |
||
| 14 | * |
||
| 15 | */ |
||
| 16 | 1 | public static function isEmail($value = null) |
|
| 19 | } |
||
| 20 | |||
| 21 | /** |
||
| 22 | * alis to original time() function which return current time |
||
| 23 | * |
||
| 24 | * @return mixed |
||
| 25 | * |
||
| 26 | */ |
||
| 27 | 1 | public static function now() |
|
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Readable wrapper for strpos() |
||
| 36 | * |
||
| 37 | * @param string $needle Substring to search for |
||
| 38 | * @param string $haystack String to search within |
||
| 39 | * @param integer $offset Index of the $haystack we wish to start at |
||
| 40 | * |
||
| 41 | * @return bool whether the |
||
| 42 | */ |
||
| 43 | 2 | public static function stringContains($needle, $haystack, $offset = 0) |
|
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Returns the first argument it receives |
||
| 50 | * |
||
| 51 | * __::identity('arg1', 'arg2'); |
||
| 52 | * >> 'arg1' |
||
| 53 | * |
||
| 54 | * @return mixed |
||
| 55 | */ |
||
| 56 | 2 | public static function identity() |
|
| 61 | } |
||
| 62 | } |