File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ $rendererName = 'Unified';
75
75
// the Diff class options
76
76
$differOptions = [
77
77
// show how many neighbor lines
78
+ // Differ::CONTEXT_ALL can be used to show the whole file
78
79
'context' => 3,
79
80
// ignore case difference
80
81
'ignoreCase' => false,
Original file line number Diff line number Diff line change 2
2
3
3
include __DIR__ . '/../vendor/autoload.php ' ;
4
4
5
+ use Jfcherng \Diff \Differ ;
5
6
use Jfcherng \Diff \DiffHelper ;
6
7
use Jfcherng \Diff \Factory \RendererFactory ;
7
8
25
26
// options for Diff class
26
27
$ diffOptions = [
27
28
// show how many neighbor lines
29
+ // Differ::CONTEXT_ALL can be used to show the whole file
28
30
'context ' => 1 ,
29
31
// ignore case difference
30
32
'ignoreCase ' => false ,
Original file line number Diff line number Diff line change 15
15
*/
16
16
final class Differ
17
17
{
18
- // a safe number for indicating showing all contexts
19
- const CONTEXT_ALL = \PHP_INT_MAX >> 4 ;
18
+ /** @var int a safe number for indicating showing all contexts */
19
+ const CONTEXT_ALL = \PHP_INT_MAX >> 3 ;
20
20
21
21
/**
22
22
* @var array cached properties and their default values
@@ -32,12 +32,12 @@ final class Differ
32
32
public $ options = [];
33
33
34
34
/**
35
- * @var string[] the " old" sequence to use as the basis for the comparison
35
+ * @var string[] the old sequence
36
36
*/
37
37
private $ old = [];
38
38
39
39
/**
40
- * @var string[] the " new" sequence to generate the changes for
40
+ * @var string[] the new sequence
41
41
*/
42
42
private $ new = [];
43
43
@@ -67,6 +67,7 @@ final class Differ
67
67
*/
68
68
private static $ defaultOptions = [
69
69
// show how many neighbor lines
70
+ // Differ::CONTEXT_ALL can be used to show the whole file
70
71
'context ' => 3 ,
71
72
// ignore case difference
72
73
'ignoreWhitespace ' => false ,
You can’t perform that action at this time.
0 commit comments