Skip to content

Commit 5ca2257

Browse files
committed
Fix some typos
1 parent 18e0b93 commit 5ca2257

File tree

8 files changed

+36
-30
lines changed

8 files changed

+36
-30
lines changed

lib/Diff.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
* @author Chris Boulton <[email protected]>
4040
* @copyright (c) 2009 Chris Boulton
4141
* @license New BSD License http://www.opensource.org/licenses/bsd-license.php
42-
* @version 1.1
43-
* @link http://github.com/chrisboulton/php-diff
42+
* @version 1.2
43+
* @link https://github.com/JBlond/php-diff
4444
*/
4545

4646
class Diff
@@ -56,7 +56,7 @@ class Diff
5656
private $b = null;
5757

5858
/**
59-
* @var array Array containing the generated opcodes for the differences between the two items.
59+
* @var array Array containing the generated op codes for the differences between the two items.
6060
*/
6161
private $groupedCodes = null;
6262

@@ -161,12 +161,12 @@ public function getB($start=0, $end=null)
161161
}
162162

163163
/**
164-
* Generate a list of the compiled and grouped opcodes for the differences between the
164+
* Generate a list of the compiled and grouped op codes for the differences between the
165165
* two strings. Generally called by the renderer, this class instantiates the sequence
166-
* matcher and performs the actual diff generation and return an array of the opcodes
166+
* matcher and performs the actual diff generation and return an array of the op codes
167167
* for it. Once generated, the results are cached in the diff class instance.
168168
*
169-
* @return array Array of the grouped opcodes for the generated diff.
169+
* @return array Array of the grouped op codes for the generated diff.
170170
*/
171171
public function getGroupedOpcodes()
172172
{

lib/Diff/Renderer/Abstract.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
* @author Chris Boulton <[email protected]>
3737
* @copyright (c) 2009 Chris Boulton
3838
* @license New BSD License http://www.opensource.org/licenses/bsd-license.php
39-
* @version 1.1
40-
* @link http://github.com/chrisboulton/php-diff
39+
* @version 1.2
40+
* @link https://github.com/JBlond/php-diff
4141
*/
4242

4343
abstract class Diff_Renderer_Abstract

lib/Diff/Renderer/Html/Array.php

+9-4
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
* @author Chris Boulton <[email protected]>
3737
* @copyright (c) 2009 Chris Boulton
3838
* @license New BSD License http://www.opensource.org/licenses/bsd-license.php
39-
* @version 1.1
40-
* @link http://github.com/chrisboulton/php-diff
39+
* @version 1.2
40+
* @link https://github.com/JBlond/php-diff
4141
*/
4242

4343
require_once dirname(__FILE__).'/../Abstract.php';
@@ -60,8 +60,13 @@ class Diff_Renderer_Html_Array extends Diff_Renderer_Abstract
6060
* From https://gist.github.com/stemar/8287074
6161
* @param mixed $string The input string.
6262
* @param mixed $replacement The replacement string.
63-
* @param mixed $start If start is positive, the replacing will begin at the start'th offset into string. If start is negative, the replacing will begin at the start'th character from the end of string.
64-
* @param mixed $length If given and is positive, it represents the length of the portion of string which is to be replaced. If it is negative, it represents the number of characters from the end of string at which to stop replacing. If it is not given, then it will default to strlen( string ); i.e. end the replacing at the end of string. Of course, if length is zero then this function will have the effect of inserting replacement into string at the given start offset.
63+
* @param mixed $start If start is positive, the replacing will begin at the start'th offset into string.
64+
* If start is negative, the replacing will begin at the start'th character from the end of string.
65+
* @param mixed $length If given and is positive, it represents the length of the portion of string which is to
66+
* be replaced. If it is negative, it represents the number of characters from the end of string at which to
67+
* stop replacing. If it is not given, then it will default to strlen( string ); i.e. end the replacing at the
68+
* end of string. Of course, if length is zero then this function will have the effect of inserting replacement
69+
* into string at the given start offset.
6570
* @return string|array The result string is returned. If string is an array then array is returned.
6671
*/
6772
public function mb_substr_replace($string, $replacement, $start, $length=NULL) {

lib/Diff/Renderer/Html/Inline.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
* @author Chris Boulton <[email protected]>
3737
* @copyright (c) 2009 Chris Boulton
3838
* @license New BSD License http://www.opensource.org/licenses/bsd-license.php
39-
* @version 1.1
40-
* @link http://github.com/chrisboulton/php-diff
39+
* @version 1.2
40+
* @link https://github.com/JBlond/php-diff
4141
*/
4242

4343
require_once dirname(__FILE__).'/Array.php';

lib/Diff/Renderer/Html/SideBySide.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
* @author Chris Boulton <[email protected]>
3737
* @copyright (c) 2009 Chris Boulton
3838
* @license New BSD License http://www.opensource.org/licenses/bsd-license.php
39-
* @version 1.1
40-
* @link http://github.com/chrisboulton/php-diff
39+
* @version 1.2
40+
* @link https://github.com/JBlond/php-diff
4141
*/
4242

4343
require_once dirname(__FILE__).'/Array.php';

lib/Diff/Renderer/Text/Context.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
* @author Chris Boulton <[email protected]>
3737
* @copyright (c) 2009 Chris Boulton
3838
* @license New BSD License http://www.opensource.org/licenses/bsd-license.php
39-
* @version 1.1
40-
* @link http://github.com/chrisboulton/php-diff
39+
* @version 1.2
40+
* @link https://github.com/JBlond/php-diff
4141
*/
4242

4343
require_once dirname(__FILE__).'/../Abstract.php';
@@ -48,7 +48,7 @@
4848
class Diff_Renderer_Text_Context extends Diff_Renderer_Abstract
4949
{
5050
/**
51-
* @var array Array of the different opcode tags and how they map to the context diff equivalent.
51+
* @var array Array of the different op code tags and how they map to the context diff equivalent.
5252
*/
5353
private $tagMap = array(
5454
'insert' => '+',

lib/Diff/Renderer/Text/Unified.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
* @author Chris Boulton <[email protected]>
3737
* @copyright (c) 2009 Chris Boulton
3838
* @license New BSD License http://www.opensource.org/licenses/bsd-license.php
39-
* @version 1.1
40-
* @link http://github.com/chrisboulton/php-diff
39+
* @version 1.2
40+
* @link https://github.com/JBlond/php-diff
4141
*/
4242

4343
require_once dirname(__FILE__).'/../Abstract.php';
@@ -74,7 +74,8 @@ public function render()
7474
if($tag == 'equal') {
7575
$diff .= ' '.implode("\n ", $this->diff->GetA($i1, $i2))."\n";
7676
}
77-
else {
77+
else
78+
{
7879
if($tag == 'replace' || $tag == 'delete') {
7980
$diff .= '-'.implode("\n-", $this->diff->GetA($i1, $i2))."\n";
8081
}

lib/Diff/SequenceMatcher.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
* @author Chris Boulton <[email protected]>
3737
* @copyright (c) 2009 Chris Boulton
3838
* @license New BSD License http://www.opensource.org/licenses/bsd-license.php
39-
* @version 1.1
40-
* @link http://github.com/chrisboulton/php-diff
39+
* @version 1.2
40+
* @link https://github.com/JBlond/php-diff
4141
*/
4242

4343
class Diff_SequenceMatcher
@@ -250,7 +250,7 @@ private function isBJunk($b)
250250
* $alo - $ahi and for the second sequence, $blo - $bhi)
251251
*
252252
* Essentially, of all of the maximal matching blocks, return the one that
253-
* startest earliest in $a, and all of those maximal matching blocks that
253+
* starts earliest in $a, and all of those maximal matching blocks that
254254
* start earliest in $a, return the one that starts earliest in $b.
255255
*
256256
* If the junk callback is defined, do the above but with the restriction
@@ -459,12 +459,12 @@ public function getMatchingBlocks()
459459
}
460460

461461
/**
462-
* Return a list of all of the opcodes for the differences between the
462+
* Return a list of all of the op codes for the differences between the
463463
* two strings.
464464
*
465-
* The nested array returned contains an array describing the opcode
465+
* The nested array returned contains an array describing the op code
466466
* which includes:
467-
* 0 - The type of tag (as described below) for the opcode.
467+
* 0 - The type of tag (as described below) for the op code.
468468
* 1 - The beginning line in the first sequence.
469469
* 2 - The end line in the first sequence.
470470
* 3 - The beginning line in the second sequence.
@@ -532,7 +532,7 @@ public function getOpCodes()
532532

533533
/**
534534
* Return a series of nested arrays containing different groups of generated
535-
* opcodes for the differences between the strings with up to $context lines
535+
* op codes for the differences between the strings with up to $context lines
536536
* of surrounding content.
537537
*
538538
* Essentially what happens here is any big equal blocks of strings are stripped
@@ -542,7 +542,7 @@ public function getOpCodes()
542542
* changes are.
543543
*
544544
* @param int $context The number of lines of context to provide around the groups.
545-
* @return array Nested array of all of the grouped opcodes.
545+
* @return array Nested array of all of the grouped op codes.
546546
*/
547547
public function getGroupedOpcodes($context=3)
548548
{

0 commit comments

Comments
 (0)