Skip to content

Commit 21684ac

Browse files
jrfnlgrogy
authored andcommitted
Use PHP Console Color 1.0
The `php-parallel-lint/php-console-color` package has tagged a new release. The most notable change is the namespace update. This updates the PHP Console Highlighter package to use the new version of PHP Console Color. Refs: * https://github.com/php-parallel-lint/PHP-Console-Color/releases/tag/v1.0
1 parent c07c8ee commit 21684ac

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Usage
1818
-------
1919
```php
2020
<?php
21-
use JakubOnderka\PhpConsoleColor\ConsoleColor;
21+
use PHP_Parallel_Lint\PhpConsoleColor\ConsoleColor;
2222
use JakubOnderka\PhpConsoleHighlighter\Highlighter;
2323

2424
require __DIR__ . '/vendor/autoload.php';

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"require": {
1717
"php": ">=5.4.0",
1818
"ext-tokenizer": "*",
19-
"php-parallel-lint/php-console-color": "^0.2 || ^0.3"
19+
"php-parallel-lint/php-console-color": "^1.0"
2020
},
2121
"require-dev": {
2222
"phpunit/phpunit": "^4.8.36 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0",

examples/snippet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
use JakubOnderka\PhpConsoleColor\ConsoleColor;
2+
use PHP_Parallel_Lint\PhpConsoleColor\ConsoleColor;
33
use JakubOnderka\PhpConsoleHighlighter\Highlighter;
44

55
require __DIR__ . '/../vendor/autoload.php';

examples/whole_file.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
use JakubOnderka\PhpConsoleColor\ConsoleColor;
2+
use PHP_Parallel_Lint\PhpConsoleColor\ConsoleColor;
33
use JakubOnderka\PhpConsoleHighlighter\Highlighter;
44

55
require __DIR__ . '/../vendor/autoload.php';

examples/whole_file_line_numbers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
use JakubOnderka\PhpConsoleColor\ConsoleColor;
2+
use PHP_Parallel_Lint\PhpConsoleColor\ConsoleColor;
33
use JakubOnderka\PhpConsoleHighlighter\Highlighter;
44

55
require __DIR__ . '/../vendor/autoload.php';

src/Highlighter.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
namespace JakubOnderka\PhpConsoleHighlighter;
33

4-
use JakubOnderka\PhpConsoleColor\ConsoleColor;
4+
use PHP_Parallel_Lint\PhpConsoleColor\ConsoleColor;
55

66
class Highlighter
77
{
@@ -31,7 +31,7 @@ class Highlighter
3131

3232
/**
3333
* @param ConsoleColor $color
34-
* @throws \JakubOnderka\PhpConsoleColor\InvalidStyleException
34+
* @throws \PHP_Parallel_Lint\PhpConsoleColor\InvalidStyleException
3535
*/
3636
public function __construct(ConsoleColor $color)
3737
{
@@ -50,7 +50,7 @@ public function __construct(ConsoleColor $color)
5050
* @param int $linesBefore
5151
* @param int $linesAfter
5252
* @return string
53-
* @throws \JakubOnderka\PhpConsoleColor\InvalidStyleException
53+
* @throws \PHP_Parallel_Lint\PhpConsoleColor\InvalidStyleException
5454
* @throws \InvalidArgumentException
5555
*/
5656
public function getCodeSnippet($source, $lineNumber, $linesBefore = 2, $linesAfter = 2)
@@ -70,7 +70,7 @@ public function getCodeSnippet($source, $lineNumber, $linesBefore = 2, $linesAft
7070
/**
7171
* @param string $source
7272
* @return string
73-
* @throws \JakubOnderka\PhpConsoleColor\InvalidStyleException
73+
* @throws \PHP_Parallel_Lint\PhpConsoleColor\InvalidStyleException
7474
* @throws \InvalidArgumentException
7575
*/
7676
public function getWholeFile($source)
@@ -83,7 +83,7 @@ public function getWholeFile($source)
8383
/**
8484
* @param string $source
8585
* @return string
86-
* @throws \JakubOnderka\PhpConsoleColor\InvalidStyleException
86+
* @throws \PHP_Parallel_Lint\PhpConsoleColor\InvalidStyleException
8787
* @throws \InvalidArgumentException
8888
*/
8989
public function getWholeFileWithLineNumbers($source)
@@ -215,7 +215,7 @@ private function splitToLines(array $tokens)
215215
/**
216216
* @param array $tokenLines
217217
* @return array
218-
* @throws \JakubOnderka\PhpConsoleColor\InvalidStyleException
218+
* @throws \PHP_Parallel_Lint\PhpConsoleColor\InvalidStyleException
219219
* @throws \InvalidArgumentException
220220
*/
221221
private function colorLines(array $tokenLines)
@@ -241,7 +241,7 @@ private function colorLines(array $tokenLines)
241241
* @param array $lines
242242
* @param null|int $markLine
243243
* @return string
244-
* @throws \JakubOnderka\PhpConsoleColor\InvalidStyleException
244+
* @throws \PHP_Parallel_Lint\PhpConsoleColor\InvalidStyleException
245245
*/
246246
private function lineNumbers(array $lines, $markLine = null)
247247
{

tests/HighlighterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ class HighlighterTest extends TestCase
1111
protected function getConsoleColorMock()
1212
{
1313
$mock = method_exists($this, 'createMock')
14-
? $this->createMock('\JakubOnderka\PhpConsoleColor\ConsoleColor')
15-
: $this->getMock('\JakubOnderka\PhpConsoleColor\ConsoleColor');
14+
? $this->createMock('\PHP_Parallel_Lint\PhpConsoleColor\ConsoleColor')
15+
: $this->getMock('\PHP_Parallel_Lint\PhpConsoleColor\ConsoleColor');
1616

1717
$mock->expects($this->any())
1818
->method('apply')

0 commit comments

Comments
 (0)