public static function solveIndicator($data) {
    $normData = strtolower(trim($data));
    foreach (self::$indicators as $key => $tests) {
      foreach ($tests as $test) {
        if ($test[0] == '/' && preg_match($test, $normData)) {
          return [$key, $normData];
        } elseif ($normData === $test) {
          return [$key, $normData];
        }
      }
    }

    return false;
  }
public static function solveIndicator($data) {
    $normData = strtolower(trim($data));
    foreach (self::$indicators as $key => $tests) {
      foreach ($tests as $test) {
        if ($test[0] == '/' && preg_match($test, $normData)) {
          return [$key, $normData];
        } elseif ($normData === $test) {
          return [$key, $normData];
        }
      }
    }

    return false;
  }
public static function solveIndicator ( $ data ) { $ normData = strtolower ( trim ( $ data ) ) ; foreach ( self :: $ indicators as $ key => $ tests ) { foreach ( $ tests as $ test ) { if ( $ test [ 0 ] == '/' && preg_match ( $ test , $ normData ) ) { return [ $ key , $ normData ] ; } elseif ( $ normData === $ test ) { return [ $ key , $ normData ] ; } } } return false ; }
Solves what type of data an indicator is
@param string $data The indicator
@return array An array with the first item containing what it represents, and second item containing the normalized version of the data, false is returned when failing to find what is indicated
Solves what type of data an indicator is