public static function validator (EntityStructure $entityStructure, $data)
    {
        switch (gettype($data)) {
            case 'array':
                return new ArrayValidator($entityStructure, $data);
            default:
                return false;
        }
    }
public static function validator (EntityStructure $entityStructure, $data)
    {
        switch (gettype($data)) {
            case 'array':
                return new ArrayValidator($entityStructure, $data);
            default:
                return false;
        }
    }
public static function validator ( EntityStructure $ entityStructure , $ data ) { switch ( gettype ( $ data ) ) { case 'array' : return new ArrayValidator ( $ entityStructure , $ data ) ; default : return false ; } }
Get validator matching for the given data type.

@param EntityStructure $entityStructure
@param mixed $data
@return Validator|false
@codeCoverageIgnore ignore due to the coverage issue in switches.
Get validator matching for the given data type .