original_string: protected static function extract($pattern)
      {
          if (str_contains($pattern, '|')) {
              $segements = explode('|', $pattern);
  
              $events[$segements[0]] = explode('.', $segements[1]);
          } else {
              $segements = explode('.', $pattern);
  
              $events[$segements[0]] = $segements[1];
          }
  
          return $events;
      }
code: protected static function extract($pattern)
      {
          if (str_contains($pattern, '|')) {
              $segements = explode('|', $pattern);
  
              $events[$segements[0]] = explode('.', $segements[1]);
          } else {
              $segements = explode('.', $pattern);
  
              $events[$segements[0]] = $segements[1];
          }
  
          return $events;
      }
code_tokens: protected static function extract ( $ pattern ) { if ( str_contains ( $ pattern , '|' ) ) { $ segements = explode ( '|' , $ pattern ) ; $ events [ $ segements [ 0 ] ] = explode ( '.' , $ segements [ 1 ] ) ; } else { $ segements = explode ( '.' , $ pattern ) ; $ events [ $ segements [ 0 ] ] = $ segements [ 1 ] ; } return $ events ; }
docstring: Extract events from string pattern.
  
  @param string $pattern
  
  @return array
docstring_tokens: Extract events from string pattern .