Skip to content

Commit 864c4ab

Browse files
committed
Switch NS
1 parent 8da5762 commit 864c4ab

25 files changed

+31
-59
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@
2626
]
2727
},
2828
"autoload-dev": {
29-
"psr-4": { "SebastianBergmann\\Diff\\Tests\\": "tests/" }
29+
"psr-4": { "PhpCsFixer\\Diff\\Tests\\": "tests/" }
3030
}
3131
}

src/Chunk.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* file that was distributed with this source code.
99
*/
1010

11-
namespace SebastianBergmann\Diff;
11+
namespace PhpCsFixer\Diff;
1212

1313
final class Chunk
1414
{

src/Diff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* file that was distributed with this source code.
99
*/
1010

11-
namespace SebastianBergmann\Diff;
11+
namespace PhpCsFixer\Diff;
1212

1313
final class Diff
1414
{

src/Differ.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
* file that was distributed with this source code.
99
*/
1010

11-
namespace SebastianBergmann\Diff;
11+
namespace PhpCsFixer\Diff;
1212

13-
use SebastianBergmann\Diff\Output\DiffOutputBuilderInterface;
14-
use SebastianBergmann\Diff\Output\UnifiedDiffOutputBuilder;
13+
use PhpCsFixer\Diff\Output\DiffOutputBuilderInterface;
14+
use PhpCsFixer\Diff\Output\UnifiedDiffOutputBuilder;
1515

1616
/**
1717
* Diff implementation.

src/Exception/Exception.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* file that was distributed with this source code.
99
*/
1010

11-
namespace SebastianBergmann\Diff;
11+
namespace PhpCsFixer\Diff;
1212

1313
interface Exception
1414
{

src/Exception/InvalidArgumentException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* file that was distributed with this source code.
99
*/
1010

11-
namespace SebastianBergmann\Diff;
11+
namespace PhpCsFixer\Diff;
1212

1313
class InvalidArgumentException extends \InvalidArgumentException implements Exception
1414
{

src/Line.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* file that was distributed with this source code.
99
*/
1010

11-
namespace SebastianBergmann\Diff;
11+
namespace PhpCsFixer\Diff;
1212

1313
final class Line
1414
{

src/LongestCommonSubsequenceCalculator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* file that was distributed with this source code.
99
*/
1010

11-
namespace SebastianBergmann\Diff;
11+
namespace PhpCsFixer\Diff;
1212

1313
interface LongestCommonSubsequenceCalculator
1414
{

src/MemoryEfficientLongestCommonSubsequenceCalculator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* file that was distributed with this source code.
99
*/
1010

11-
namespace SebastianBergmann\Diff;
11+
namespace PhpCsFixer\Diff;
1212

1313
final class MemoryEfficientLongestCommonSubsequenceCalculator implements LongestCommonSubsequenceCalculator
1414
{

src/Output/AbstractChunkOutputBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* file that was distributed with this source code.
99
*/
1010

11-
namespace SebastianBergmann\Diff\Output;
11+
namespace PhpCsFixer\Diff\Output;
1212

1313
abstract class AbstractChunkOutputBuilder implements DiffOutputBuilderInterface
1414
{

src/Output/DiffOnlyOutputBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* For the full copyright and license information, please view the LICENSE
88
* file that was distributed with this source code.
99
*/
10-
namespace SebastianBergmann\Diff\Output;
10+
namespace PhpCsFixer\Diff\Output;
1111

1212
/**
1313
* Builds a diff string representation in a loose unified diff format

src/Output/DiffOutputBuilderInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* For the full copyright and license information, please view the LICENSE
88
* file that was distributed with this source code.
99
*/
10-
namespace SebastianBergmann\Diff\Output;
10+
namespace PhpCsFixer\Diff\Output;
1111

1212
/**
1313
* Defines how an output builder should take a generated

src/Output/UnifiedDiffOutputBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* file that was distributed with this source code.
99
*/
1010

11-
namespace SebastianBergmann\Diff\Output;
11+
namespace PhpCsFixer\Diff\Output;
1212

1313
/**
1414
* Builds a diff string representation in unified diff format in chunks.

src/Parser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* file that was distributed with this source code.
99
*/
1010

11-
namespace SebastianBergmann\Diff;
11+
namespace PhpCsFixer\Diff;
1212

1313
/**
1414
* Unified diff parser.

src/TimeEfficientLongestCommonSubsequenceCalculator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* file that was distributed with this source code.
99
*/
1010

11-
namespace SebastianBergmann\Diff;
11+
namespace PhpCsFixer\Diff;
1212

1313
final class TimeEfficientLongestCommonSubsequenceCalculator implements LongestCommonSubsequenceCalculator
1414
{

tests/ChunkTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* file that was distributed with this source code.
99
*/
1010

11-
namespace SebastianBergmann\Diff;
11+
namespace PhpCsFixer\Diff;
1212

1313
use PHPUnit\Framework\TestCase;
1414

tests/CommonChunksTestOutputBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
* file that was distributed with this source code.
99
*/
1010

11-
namespace SebastianBergmann\Diff\Tests;
11+
namespace PhpCsFixer\Diff\Tests;
1212

13-
use SebastianBergmann\Diff\Output\AbstractChunkOutputBuilder;
13+
use PhpCsFixer\Diff\Output\AbstractChunkOutputBuilder;
1414

1515
/**
1616
* @author SpacePossum

tests/DiffTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* file that was distributed with this source code.
99
*/
1010

11-
namespace SebastianBergmann\Diff;
11+
namespace PhpCsFixer\Diff;
1212

1313
use PHPUnit\Framework\TestCase;
1414

tests/DifferTest.php

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@
88
* file that was distributed with this source code.
99
*/
1010

11-
namespace SebastianBergmann\Diff;
11+
namespace PhpCsFixer\Diff;
1212

1313
use PHPUnit\Framework\TestCase;
14-
use SebastianBergmann\Diff\Output\AbstractChunkOutputBuilder;
15-
use SebastianBergmann\Diff\Output\DiffOnlyOutputBuilder;
16-
use SebastianBergmann\Diff\Output\UnifiedDiffOutputBuilder;
17-
use SebastianBergmann\Diff\Tests\CommonChunksTestOutputBuilder;
14+
use PhpCsFixer\Diff\Output\DiffOnlyOutputBuilder;
15+
use PhpCsFixer\Diff\Output\UnifiedDiffOutputBuilder;
16+
use PhpCsFixer\Diff\Tests\CommonChunksTestOutputBuilder;
1817

1918
/**
2019
* @covers SebastianBergmann\Diff\Differ
@@ -145,19 +144,6 @@ public function testTypesOtherThanArrayAndStringCanBePassed()
145144
);
146145
}
147146

148-
/**
149-
* @param string $diff
150-
* @param Diff[] $expected
151-
* @dataProvider diffProvider
152-
*/
153-
public function testParser($diff, array $expected)
154-
{
155-
$parser = new Parser;
156-
$result = $parser->parse($diff);
157-
158-
$this->assertEquals($expected, $result);
159-
}
160-
161147
public function arrayProvider()
162148
{
163149
return [
@@ -410,20 +396,6 @@ public function textProvider()
410396
];
411397
}
412398

413-
public function diffProvider()
414-
{
415-
$serialized_arr = <<<EOL
416-
a:1:{i:0;O:27:"SebastianBergmann\Diff\Diff":3:{s:33:"SebastianBergmann\Diff\Difffrom";s:7:"old.txt";s:31:"SebastianBergmann\Diff\Diffto";s:7:"new.txt";s:35:"SebastianBergmann\Diff\Diffchunks";a:3:{i:0;O:28:"SebastianBergmann\Diff\Chunk":5:{s:35:"SebastianBergmann\Diff\Chunkstart";i:1;s:40:"SebastianBergmann\Diff\ChunkstartRange";i:3;s:33:"SebastianBergmann\Diff\Chunkend";i:1;s:38:"SebastianBergmann\Diff\ChunkendRange";i:4;s:35:"SebastianBergmann\Diff\Chunklines";a:4:{i:0;O:27:"SebastianBergmann\Diff\Line":2:{s:33:"SebastianBergmann\Diff\Linetype";i:1;s:36:"SebastianBergmann\Diff\Linecontent";s:7:"2222111";}i:1;O:27:"SebastianBergmann\Diff\Line":2:{s:33:"SebastianBergmann\Diff\Linetype";i:3;s:36:"SebastianBergmann\Diff\Linecontent";s:7:"1111111";}i:2;O:27:"SebastianBergmann\Diff\Line":2:{s:33:"SebastianBergmann\Diff\Linetype";i:3;s:36:"SebastianBergmann\Diff\Linecontent";s:7:"1111111";}i:3;O:27:"SebastianBergmann\Diff\Line":2:{s:33:"SebastianBergmann\Diff\Linetype";i:3;s:36:"SebastianBergmann\Diff\Linecontent";s:7:"1111111";}}}i:1;O:28:"SebastianBergmann\Diff\Chunk":5:{s:35:"SebastianBergmann\Diff\Chunkstart";i:5;s:40:"SebastianBergmann\Diff\ChunkstartRange";i:10;s:33:"SebastianBergmann\Diff\Chunkend";i:6;s:38:"SebastianBergmann\Diff\ChunkendRange";i:8;s:35:"SebastianBergmann\Diff\Chunklines";a:11:{i:0;O:27:"SebastianBergmann\Diff\Line":2:{s:33:"SebastianBergmann\Diff\Linetype";i:3;s:36:"SebastianBergmann\Diff\Linecontent";s:7:"1111111";}i:1;O:27:"SebastianBergmann\Diff\Line":2:{s:33:"SebastianBergmann\Diff\Linetype";i:3;s:36:"SebastianBergmann\Diff\Linecontent";s:7:"1111111";}i:2;O:27:"SebastianBergmann\Diff\Line":2:{s:33:"SebastianBergmann\Diff\Linetype";i:3;s:36:"SebastianBergmann\Diff\Linecontent";s:7:"1111111";}i:3;O:27:"SebastianBergmann\Diff\Line":2:{s:33:"SebastianBergmann\Diff\Linetype";i:3;s:36:"SebastianBergmann\Diff\Linecontent";s:8:"+1121211";}i:4;O:27:"SebastianBergmann\Diff\Line":2:{s:33:"SebastianBergmann\Diff\Linetype";i:3;s:36:"SebastianBergmann\Diff\Linecontent";s:7:"1111111";}i:5;O:27:"SebastianBergmann\Diff\Line":2:{s:33:"SebastianBergmann\Diff\Linetype";i:3;s:36:"SebastianBergmann\Diff\Linecontent";s:8:"-1111111";}i:6;O:27:"SebastianBergmann\Diff\Line":2:{s:33:"SebastianBergmann\Diff\Linetype";i:3;s:36:"SebastianBergmann\Diff\Linecontent";s:8:"-1111111";}i:7;O:27:"SebastianBergmann\Diff\Line":2:{s:33:"SebastianBergmann\Diff\Linetype";i:3;s:36:"SebastianBergmann\Diff\Linecontent";s:8:"-2222222";}i:8;O:27:"SebastianBergmann\Diff\Line":2:{s:33:"SebastianBergmann\Diff\Linetype";i:3;s:36:"SebastianBergmann\Diff\Linecontent";s:7:"2222222";}i:9;O:27:"SebastianBergmann\Diff\Line":2:{s:33:"SebastianBergmann\Diff\Linetype";i:3;s:36:"SebastianBergmann\Diff\Linecontent";s:7:"2222222";}i:10;O:27:"SebastianBergmann\Diff\Line":2:{s:33:"SebastianBergmann\Diff\Linetype";i:3;s:36:"SebastianBergmann\Diff\Linecontent";s:7:"2222222";}}}i:2;O:28:"SebastianBergmann\Diff\Chunk":5:{s:35:"SebastianBergmann\Diff\Chunkstart";i:17;s:40:"SebastianBergmann\Diff\ChunkstartRange";i:5;s:33:"SebastianBergmann\Diff\Chunkend";i:16;s:38:"SebastianBergmann\Diff\ChunkendRange";i:6;s:35:"SebastianBergmann\Diff\Chunklines";a:6:{i:0;O:27:"SebastianBergmann\Diff\Line":2:{s:33:"SebastianBergmann\Diff\Linetype";i:3;s:36:"SebastianBergmann\Diff\Linecontent";s:7:"2222222";}i:1;O:27:"SebastianBergmann\Diff\Line":2:{s:33:"SebastianBergmann\Diff\Linetype";i:3;s:36:"SebastianBergmann\Diff\Linecontent";s:7:"2222222";}i:2;O:27:"SebastianBergmann\Diff\Line":2:{s:33:"SebastianBergmann\Diff\Linetype";i:3;s:36:"SebastianBergmann\Diff\Linecontent";s:7:"2222222";}i:3;O:27:"SebastianBergmann\Diff\Line":2:{s:33:"SebastianBergmann\Diff\Linetype";i:3;s:36:"SebastianBergmann\Diff\Linecontent";s:8:"+2122212";}i:4;O:27:"SebastianBergmann\Diff\Line":2:{s:33:"SebastianBergmann\Diff\Linetype";i:3;s:36:"SebastianBergmann\Diff\Linecontent";s:7:"2222222";}i:5;O:27:"SebastianBergmann\Diff\Line":2:{s:33:"SebastianBergmann\Diff\Linetype";i:3;s:36:"SebastianBergmann\Diff\Linecontent";s:7:"2222222";}}}}}}
417-
EOL;
418-
419-
return [
420-
[
421-
"--- old.txt 2014-11-04 08:51:02.661868729 +0300\n+++ new.txt 2014-11-04 08:51:02.665868730 +0300\n@@ -1,3 +1,4 @@\n+2222111\n 1111111\n 1111111\n 1111111\n@@ -5,10 +6,8 @@\n 1111111\n 1111111\n 1111111\n +1121211\n 1111111\n -1111111\n -1111111\n -2222222\n 2222222\n 2222222\n 2222222\n@@ -17,5 +16,6 @@\n 2222222\n 2222222\n 2222222\n +2122212\n 2222222\n 2222222\n",
422-
\unserialize($serialized_arr)
423-
]
424-
];
425-
}
426-
427399
/**
428400
* @param string $expected
429401
* @param string $from

tests/DifferTestTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* file that was distributed with this source code.
99
*/
1010

11-
namespace SebastianBergmann\Diff;
11+
namespace PhpCsFixer\Diff;
1212

1313
use PHPUnit\Framework\TestCase;
1414

tests/LineTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* file that was distributed with this source code.
99
*/
1010

11-
namespace SebastianBergmann\Diff;
11+
namespace PhpCsFixer\Diff;
1212

1313
use PHPUnit\Framework\TestCase;
1414

tests/LongestCommonSubsequenceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* file that was distributed with this source code.
99
*/
1010

11-
namespace SebastianBergmann\Diff;
11+
namespace PhpCsFixer\Diff;
1212

1313
use PHPUnit\Framework\TestCase;
1414

tests/MemoryEfficientImplementationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* file that was distributed with this source code.
99
*/
1010

11-
namespace SebastianBergmann\Diff;
11+
namespace PhpCsFixer\Diff;
1212

1313
/**
1414
* @covers SebastianBergmann\Diff\MemoryEfficientLongestCommonSubsequenceCalculator

tests/ParserTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* file that was distributed with this source code.
99
*/
1010

11-
namespace SebastianBergmann\Diff;
11+
namespace PhpCsFixer\Diff;
1212

1313
use PHPUnit\Framework\TestCase;
1414

tests/TimeEfficientImplementationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* file that was distributed with this source code.
99
*/
1010

11-
namespace SebastianBergmann\Diff;
11+
namespace PhpCsFixer\Diff;
1212

1313
/**
1414
* @covers SebastianBergmann\Diff\TimeEfficientLongestCommonSubsequenceCalculator

0 commit comments

Comments
 (0)