| Total Complexity | 3 |
| Total Lines | 56 |
| Duplicated Lines | 0 % |
| Coverage | 33.33% |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | class DataHelper { |
||
| 17 | /** |
||
| 18 | * N - Indicates that a numerical value [0-9] is accepted |
||
| 19 | * |
||
| 20 | * @var array |
||
| 21 | */ |
||
| 22 | private static $characters_n = array( '0-9' ); |
||
| 23 | |||
| 24 | /** |
||
| 25 | * A - Indicates that an alphabetical value [aA-zZ] is accepted |
||
| 26 | * |
||
| 27 | * @var array |
||
| 28 | */ |
||
| 29 | private static $characters_a = array( 'A-Z', 'a-z' ); |
||
| 30 | |||
| 31 | /** |
||
| 32 | * A + N |
||
| 33 | * |
||
| 34 | * @var array |
||
| 35 | */ |
||
| 36 | private static $characters_an = array( 'A-Z', 'a-z', '0-9' ); |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Filter N characters |
||
| 40 | * |
||
| 41 | * @param string $string |
||
| 42 | * @param string $max |
||
| 43 | * |
||
| 44 | * @return string |
||
| 45 | */ |
||
| 46 | public static function filter_n( $string, $max = null ) { |
||
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * Filter A characters |
||
| 52 | * |
||
| 53 | * @param string $string |
||
| 54 | * @param string $max |
||
| 55 | * |
||
| 56 | * @return string |
||
| 57 | */ |
||
| 58 | public static function filter_a( $string, $max = null ) { |
||
| 59 | return Core_DataHelper::filter( self::$characters_a, $string, $max ); |
||
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * Filter A + N characters |
||
| 64 | * |
||
| 65 | * @param string $string |
||
| 66 | * @param string $max |
||
| 67 | * |
||
| 68 | * @return string |
||
| 69 | */ |
||
| 70 | 2 | public static function filter_an( $string, $max = null ) { |
|
| 72 | } |
||
| 73 | } |
||
| 74 |