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';
7575// the Diff class options
7676$differOptions = [
7777 // show how many neighbor lines
78+ // Differ::CONTEXT_ALL can be used to show the whole file
7879 'context' => 3,
7980 // ignore case difference
8081 'ignoreCase' => false,
Original file line number Diff line number Diff line change 22
33include __DIR__ . '/../vendor/autoload.php ' ;
44
5+ use Jfcherng \Diff \Differ ;
56use Jfcherng \Diff \DiffHelper ;
67use Jfcherng \Diff \Factory \RendererFactory ;
78
2526 // options for Diff class
2627 $ diffOptions = [
2728 // show how many neighbor lines
29+ // Differ::CONTEXT_ALL can be used to show the whole file
2830 'context ' => 1 ,
2931 // ignore case difference
3032 'ignoreCase ' => false ,
Original file line number Diff line number Diff line change 1515 */
1616final class Differ
1717{
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 ;
2020
2121 /**
2222 * @var array cached properties and their default values
@@ -32,12 +32,12 @@ final class Differ
3232 public $ options = [];
3333
3434 /**
35- * @var string[] the " old" sequence to use as the basis for the comparison
35+ * @var string[] the old sequence
3636 */
3737 private $ old = [];
3838
3939 /**
40- * @var string[] the " new" sequence to generate the changes for
40+ * @var string[] the new sequence
4141 */
4242 private $ new = [];
4343
@@ -67,6 +67,7 @@ final class Differ
6767 */
6868 private static $ defaultOptions = [
6969 // show how many neighbor lines
70+ // Differ::CONTEXT_ALL can be used to show the whole file
7071 'context ' => 3 ,
7172 // ignore case difference
7273 'ignoreWhitespace ' => false ,
You can’t perform that action at this time.
0 commit comments