@@ -44,70 +44,64 @@ final class Differ
4444 /**
4545 * @var array array of the options that have been applied for generating the diff
4646 */
47- public $ options = [];
47+ public array $ options = [];
4848
4949 /**
5050 * @var string[] the old sequence
5151 */
52- private $ old = [];
52+ private array $ old = [];
5353
5454 /**
5555 * @var string[] the new sequence
5656 */
57- private $ new = [];
57+ private array $ new = [];
5858
5959 /**
6060 * @var bool is any of cached properties dirty?
6161 */
62- private $ isCacheDirty = true ;
62+ private bool $ isCacheDirty = true ;
6363
6464 /**
6565 * @var SequenceMatcher the sequence matcher
6666 */
67- private $ sequenceMatcher ;
67+ private SequenceMatcher $ sequenceMatcher ;
6868
69- /**
70- * @var int
71- */
72- private $ oldSrcLength = 0 ;
69+ private int $ oldSrcLength = 0 ;
7370
74- /**
75- * @var int
76- */
77- private $ newSrcLength = 0 ;
71+ private int $ newSrcLength = 0 ;
7872
7973 /**
8074 * @var int the end index for the old if the old has no EOL at EOF
8175 * -1 means the old has an EOL at EOF
8276 */
83- private $ oldNoEolAtEofIdx = -1 ;
77+ private int $ oldNoEolAtEofIdx = -1 ;
8478
8579 /**
8680 * @var int the end index for the new if the new has no EOL at EOF
8781 * -1 means the new has an EOL at EOF
8882 */
89- private $ newNoEolAtEofIdx = -1 ;
83+ private int $ newNoEolAtEofIdx = -1 ;
9084
9185 /**
9286 * @var int the result of comparing the old and the new with the spaceship operator
9387 * -1 means old < new, 0 means old == new, 1 means old > new
9488 */
95- private $ oldNewComparison = 0 ;
89+ private int $ oldNewComparison = 0 ;
9690
9791 /**
9892 * @var int[][][] array containing the generated opcodes for the differences between the two items
9993 */
100- private $ groupedOpcodes = [];
94+ private array $ groupedOpcodes = [];
10195
10296 /**
10397 * @var int[][][] array containing the generated opcodes for the differences between the two items (GNU version)
10498 */
105- private $ groupedOpcodesGnu = [];
99+ private array $ groupedOpcodesGnu = [];
106100
107101 /**
108102 * @var array associative array of the default options available for the Differ class and their default value
109103 */
110- private static $ defaultOptions = [
104+ private static array $ defaultOptions = [
111105 // show how many neighbor lines
112106 // Differ::CONTEXT_ALL can be used to show the whole file
113107 'context ' => 3 ,
0 commit comments