original_string: protected function extractVariables($content)
      {
          preg_match_all('/\[\[(.*?)\]\]/', $content, $matches);
  
          if (!isset($matches[0], $matches[1])) {
              return [];
          }
          $return        = [];
          $notifications = \Antares\Foundation\Notification::getInstance()->all();
  
          foreach ($matches[1] as $index => $match) {
              if (!str_contains($match, '::')) {
                  continue;
              }
              list($component, $var) = explode('::', trim($match));
              $name = $this->findExtensionName($component);
              if (!$name) {
                  continue;
              }
              $variables                   = $notifications[$name]['variables'];
              $return[$matches[0][$index]] = $this->resolveValue($var, $variables);
          }
          return $return;
      }
code: protected function extractVariables($content)
      {
          preg_match_all('/\[\[(.*?)\]\]/', $content, $matches);
  
          if (!isset($matches[0], $matches[1])) {
              return [];
          }
          $return        = [];
          $notifications = \Antares\Foundation\Notification::getInstance()->all();
  
          foreach ($matches[1] as $index => $match) {
              if (!str_contains($match, '::')) {
                  continue;
              }
              list($component, $var) = explode('::', trim($match));
              $name = $this->findExtensionName($component);
              if (!$name) {
                  continue;
              }
              $variables                   = $notifications[$name]['variables'];
              $return[$matches[0][$index]] = $this->resolveValue($var, $variables);
          }
          return $return;
      }
code_tokens: protected function extractVariables ( $ content ) { preg_match_all ( '/\[\[(.*?)\]\]/' , $ content , $ matches ) ; if ( ! isset ( $ matches [ 0 ] , $ matches [ 1 ] ) ) { return [ ] ; } $ return = [ ] ; $ notifications = \ Antares \ Foundation \ Notification :: getInstance ( ) -> all ( ) ; foreach ( $ matches [ 1 ] as $ index => $ match ) { if ( ! str_contains ( $ match , '::' ) ) { continue ; } list ( $ component , $ var ) = explode ( '::' , trim ( $ match ) ) ; $ name = $ this -> findExtensionName ( $ component ) ; if ( ! $ name ) { continue ; } $ variables = $ notifications [ $ name ] [ 'variables' ] ; $ return [ $ matches [ 0 ] [ $ index ] ] = $ this -> resolveValue ( $ var , $ variables ) ; } return $ return ; }
docstring: extract variables from notification
  
  @param String $content
  @return array
docstring_tokens: extract variables from notification