Skip to content

Commit 43ec176

Browse files
Fixed formatting of ResultPrinterXX.php files
1 parent ea6c31a commit 43ec176

7 files changed

+11
-14
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Extend the default PHPUnit Result Printer with a modern, pretty printer!
44

55
[PHPUnit Pretty Result Printer -- Packagist](https://packagist.org/packages/codedungeon/phpunit-result-printer)
66

7-
## Installation
7+
### Installation
88

99
Installation is provided via composer and can be done with the following command, the current version requires PHP 7.1 or greater:
1010

@@ -18,6 +18,7 @@ If you are using PHP 7.0.x, you will need to use a compatible version of PHPUnit
1818
```bash
1919
composer require --dev codedungeon/phpunit-result-printer:^0.8
2020
```
21+
2122
### Usage
2223

2324
To activate the Printer for PHPUnit, just add it to your configuration XML:
@@ -34,6 +35,7 @@ Or from Command-Line:
3435
```bash
3536
phpunit --printer=Codedungeon\\PHPUnitPrettyResultPrinter\\Printer
3637
```
38+
3739
#### Customizing Markers
3840
You can customize the markers which are used for `success`, `fail`, `error`, `skipped`, `incomplete` by modifying the `phpunit-printer.yml` file.
3941
- Create a `phpunit-printer.yml` file in your application root to override default
@@ -62,7 +64,6 @@ E-Mail: [[email protected]](mailto:[email protected])
6264
Twitter: [@codedungeon](http://twitter.com/codedungeon)
6365

6466
Website: [https://github.com/mikeerickson](https://github.com/mikeerickson)
65-
6667
### Screenshot
6768

6869
![Screenshot](https://github.com/mikeerickson/phpunit-pretty-result-printer/blob/master/sample.png)

src/Printer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace Codedungeon\PHPUnitPrettyResultPrinter;
44

5-
use PHPUnit_TextUI_ResultPrinter;
65
use PHPUnit\Runner\Version;
6+
use PHPUnit_TextUI_ResultPrinter;
77

88
if (class_exists(PHPUnit_TextUI_ResultPrinter::class)) {
99
require __DIR__ . '/ResultPrinter5.php';

src/PrinterTrait.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function __construct(
8080
}
8181

8282
$this->maxNumberOfColumns = $this->getWidth();
83-
$this->maxClassNameLength = min((int) ($this->maxNumberOfColumns / 2), $this->maxClassNameLength);
83+
$this->maxClassNameLength = min((int)($this->maxNumberOfColumns / 2), $this->maxClassNameLength);
8484

8585
// setup module options
8686
$this->printerOptions = $this->configuration->all();
@@ -114,7 +114,7 @@ public function getConfigurationFile($configFileName = 'phpunit-printer.yml')
114114
$continue = true;
115115
while (!file_exists($filename) && $continue) {
116116
$filename = $configPath . DIRECTORY_SEPARATOR . $configFileName;
117-
if (($this->isWindows() && strlen($configPath) === 3) || $configPath === '/') {
117+
if (($this->isWindows() && \strlen($configPath) === 3) || $configPath === '/') {
118118
$filename = $defaultConfigFilename;
119119
$continue = false;
120120
}
@@ -251,7 +251,7 @@ private function getWidth()
251251

252252
// 'stty size' output example: 36 120
253253
if (\count($out) > 0) {
254-
$width = (int) explode(' ', array_pop($out))[1];
254+
$width = (int)explode(' ', array_pop($out))[1];
255255
}
256256

257257
// handle CircleCI case (probably the same with TravisCI as well)

src/ResultPrinter5.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
44

55
use PHPUnit_Framework_Test;
66
use PHPUnit_TextUI_ResultPrinter;
7-
use function get_class;
87

98
class ResultPrinter5 extends PHPUnit_TextUI_ResultPrinter
109
{
1110
public function startTest(PHPUnit_Framework_Test $test)
1211
{
13-
$this->className = get_class($test);
12+
$this->className = \get_class($test);
1413
parent::startTest($test);
1514
}
1615
}

src/ResultPrinter6.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
44

55
use PHPUnit\Framework\Test;
66
use PHPUnit\TextUI\ResultPrinter;
7-
use function get_class;
87

98
class ResultPrinter6 extends ResultPrinter
109
{
1110
public function startTest(Test $test)
1211
{
13-
$this->className = get_class($test);
12+
$this->className = \get_class($test);
1413
parent::startTest($test);
1514
}
1615

src/ResultPrinter70.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
44

55
use PHPUnit\Framework\Test;
66
use PHPUnit\TextUI\ResultPrinter;
7-
use function get_class;
87

98
class ResultPrinter70 extends ResultPrinter
109
{
1110
public function startTest(Test $test): void
1211
{
13-
$this->className = get_class($test);
12+
$this->className = \get_class($test);
1413
parent::startTest($test);
1514
}
1615

src/ResultPrinter71.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
44

55
use PHPUnit\Framework\Test;
66
use PHPUnit\TextUI\ResultPrinter;
7-
use function get_class;
87

98
class ResultPrinter71 extends ResultPrinter
109
{
1110
public function startTest(Test $test): void
1211
{
13-
$this->className = get_class($test);
12+
$this->className = \get_class($test);
1413
parent::startTest($test);
1514
}
1615

0 commit comments

Comments
 (0)