Skip to content

Development #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Copyright (c) 2009 Chris Boulton <[email protected]>
Copyright (c) 2015 Mario Brandt <[email protected]>
Copyright (c) 2020 Mario Brandt <[email protected]>
Copyright (c) 2020 Ferry Cools <[email protected]>

All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,16 @@ composer require jblond/php-diff

```PHP
<?php
use jblond\Autoloader;
use jblond\Diff;
use jblond\Diff\Renderer\Html\SideBySide;

// Installed via composer...
require 'vendor/autoload.php';
// ...or installed manually.
require dirname(__FILE__).'/../lib/Autoloader.php';

new \jblond\Autoloader();
new Autoloader();

$a = file_get_contents(dirname(__FILE__).'/a.txt');
$b = file_get_contents(dirname(__FILE__).'/b.txt');
Expand All @@ -45,10 +49,10 @@ $options = [
];

// Initialize the diff class.
$diff = new \jblond\Diff($a, $b /*, $options */);
$diff = new Diff($a, $b /*, $options */);

// Choose Renderer.
$renderer = new \jblond\Diff\Renderer\Html\SideBySide([
$renderer = new SideBySide([
'title1' => 'Custom title for OLD version',
'title2' => 'Custom title for NEW version',
]);
Expand Down