|
14 | 14 | final class SequenceMatcher |
15 | 15 | { |
16 | 16 | // people may prefer this for debugging |
17 | | - const OPCODE_EQUAL = 'eq'; |
18 | | - const OPCODE_DELETE = 'del'; |
19 | | - const OPCODE_INSERT = 'ins'; |
20 | | - const OPCODE_REPLACE = 'rep'; |
| 17 | + const OP_EQ = 'eq'; |
| 18 | + const OP_DEL = 'del'; |
| 19 | + const OP_INS = 'ins'; |
| 20 | + const OP_REP = 'rep'; |
21 | 21 |
|
22 | 22 | // people may prefer this for bit operations |
23 | | - const OPCODE_INT_EQUAL = 1 << 0; |
24 | | - const OPCODE_INT_DELETE = 1 << 1; |
25 | | - const OPCODE_INT_INSERT = 1 << 2; |
26 | | - const OPCODE_INT_REPLACE = 1 << 3; |
| 23 | + const OP_INT_EQ = 1 << 0; |
| 24 | + const OP_INT_DEL = 1 << 1; |
| 25 | + const OP_INT_INS = 1 << 2; |
| 26 | + const OP_INT_REP = 1 << 3; |
27 | 27 |
|
28 | 28 | /** |
29 | 29 | * @var null|callable either a string or an array containing a callback function to determine if a line is "junk" or not |
@@ -583,17 +583,17 @@ private function setOps(bool $useIntOpcodes): self |
583 | 583 | { |
584 | 584 | if ($useIntOpcodes) { |
585 | 585 | $this->ops = [ |
586 | | - 'del' => self::OPCODE_INT_DELETE, |
587 | | - 'eq' => self::OPCODE_INT_EQUAL, |
588 | | - 'ins' => self::OPCODE_INT_INSERT, |
589 | | - 'rep' => self::OPCODE_INT_REPLACE, |
| 586 | + 'del' => self::OP_INT_DEL, |
| 587 | + 'eq' => self::OP_INT_EQ, |
| 588 | + 'ins' => self::OP_INT_INS, |
| 589 | + 'rep' => self::OP_INT_REP, |
590 | 590 | ]; |
591 | 591 | } else { |
592 | 592 | $this->ops = [ |
593 | | - 'del' => self::OPCODE_DELETE, |
594 | | - 'eq' => self::OPCODE_EQUAL, |
595 | | - 'ins' => self::OPCODE_INSERT, |
596 | | - 'rep' => self::OPCODE_REPLACE, |
| 593 | + 'del' => self::OP_DEL, |
| 594 | + 'eq' => self::OP_EQ, |
| 595 | + 'ins' => self::OP_INS, |
| 596 | + 'rep' => self::OP_REP, |
597 | 597 | ]; |
598 | 598 | } |
599 | 599 |
|
|
0 commit comments