Exemplo n.º 1
0
 /**
  * Generate a list of the compiled and grouped opcodes for the differences between the
  * two strings. Generally called by the renderer, this class instantiates the sequence
  * matcher and performs the actual diff generation and return an array of the opcodes
  * for it. Once generated, the results are cached in the diff class instance.
  *
  * @return array Array of the grouped opcodes for the generated diff.
  */
 public function getGroupedOpcodes()
 {
     if (!is_null($this->groupedCodes)) {
         return $this->groupedCodes;
     }
     require_once dirname(__FILE__) . '/Diff/SequenceMatcher.php';
     $sequenceMatcher = new Diff_SequenceMatcher($this->a, $this->b, null, $this->options);
     $this->groupedCodes = $sequenceMatcher->getGroupedOpcodes();
     return $this->groupedCodes;
 }
Exemplo n.º 2
0
 /**
  * Generate a list of the compiled and grouped opcodes for the differences between the
  * two strings. Generally called by the renderer, this class instantiates the sequence
  * matcher and performs the actual diff generation and return an array of the opcodes
  * for it. Once generated, the results are cached in the diff class instance.
  *
  * @return array Array of the grouped opcodes for the generated diff.
  */
 public function getGroupedOpcodes()
 {
     if (!is_null($this->groupedCodes)) {
         return $this->groupedCodes;
     }
     $sequenceMatcher = new Diff_SequenceMatcher($this->a, $this->b, null, $this->options);
     $this->groupedCodes = $sequenceMatcher->getGroupedOpcodes($this->options['context']);
     return $this->groupedCodes;
 }