-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PHP8 Compatibility
- Loading branch information
Showing
9 changed files
with
88 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
namespace Caxy\HtmlDiff; | ||
|
||
/** | ||
* A (string) block of text is the same between the two provided versions. | ||
*/ | ||
class MatchingBlock implements \Countable | ||
{ | ||
public $startInOld; | ||
public $startInNew; | ||
public $size; | ||
|
||
public function __construct(int $startInOld, int $startInNew, int $size) | ||
{ | ||
$this->startInOld = $startInOld; | ||
$this->startInNew = $startInNew; | ||
$this->size = $size; | ||
} | ||
|
||
public function endInOld() : int | ||
{ | ||
return ($this->startInOld + $this->size); | ||
} | ||
|
||
public function endInNew() : int | ||
{ | ||
return ($this->startInNew + $this->size); | ||
} | ||
|
||
public function count() : int | ||
{ | ||
return (int)$this->size; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0"?> | ||
<ruleset> | ||
<file>./lib</file> | ||
<file>./tests</file> | ||
<rule ref="PSR2" /> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,22 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<phpunit backupGlobals="false" | ||
backupStaticAttributes="false" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false" | ||
syntaxCheck="false" | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" backupStaticAttributes="false" | ||
colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" | ||
bootstrap="./tests/Caxy/Tests/TestInit.php" | ||
> | ||
|
||
<groups> | ||
<exclude> | ||
<group>performance</group> | ||
</exclude> | ||
</groups> | ||
|
||
<testsuites> | ||
<testsuite name="php-htmldiff Test Suite"> | ||
<directory>./tests/Caxy/Tests/HtmlDiff</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<filter> | ||
<whitelist processUncoveredFilesFromWhitelist="true"> | ||
<directory suffix=".php">./lib</directory> | ||
</whitelist> | ||
</filter> | ||
|
||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> | ||
<coverage processUncoveredFiles="true"> | ||
<include> | ||
<directory suffix=".php">./lib</directory> | ||
</include> | ||
</coverage> | ||
<groups> | ||
<exclude> | ||
<group>performance</group> | ||
</exclude> | ||
</groups> | ||
<testsuites> | ||
<testsuite name="php-htmldiff Test Suite"> | ||
<directory>./tests/Caxy/Tests/HtmlDiff</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters