original_string: private static function parse($file, $data)
      {
          $file = file_get_contents($file, FILE_USE_INCLUDE_PATH);
  
          // Go through each variable and replace the values
          foreach($data as $key => $value)
          {
              $pattern = '{{{' . $key . '}}}';
              $file = preg_replace($pattern, $value, $file);
          }
  
          if(!!$file)
          {
              return $file;
          }
  
          return false;
      }
code: private static function parse($file, $data)
      {
          $file = file_get_contents($file, FILE_USE_INCLUDE_PATH);
  
          // Go through each variable and replace the values
          foreach($data as $key => $value)
          {
              $pattern = '{{{' . $key . '}}}';
              $file = preg_replace($pattern, $value, $file);
          }
  
          if(!!$file)
          {
              return $file;
          }
  
          return false;
      }
code_tokens: private static function parse ( $ file , $ data ) { $ file = file_get_contents ( $ file , FILE_USE_INCLUDE_PATH ) ; // Go through each variable and replace the values foreach ( $ data as $ key => $ value ) { $ pattern = '{{{' . $ key . '}}}' ; $ file = preg_replace ( $ pattern , $ value , $ file ) ; } if ( ! ! $ file ) { return $ file ; } return false ; }
docstring: Parse a template with some data.
  
  @param string $file The template file we want the data to be put into
  @param array $data The data structure
  @return string|boolean The filled-put template OR false
docstring_tokens: Parse a template with some data .