Skip to content

Commit 89cae50

Browse files
committed
cs
1 parent 0f4a99d commit 89cae50

File tree

10 files changed

+15
-14
lines changed

10 files changed

+15
-14
lines changed

src/CodeCoverage/Collector.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
declare(strict_types=1);
99

1010
namespace Tester\CodeCoverage;
11+
use pcov;
1112

1213

1314
/**
@@ -108,7 +109,7 @@ public static function save(): void
108109

109110
private static function startPCOV(): void
110111
{
111-
\pcov\start();
112+
pcov\start();
112113
}
113114

114115

@@ -119,9 +120,9 @@ private static function collectPCOV(): array
119120
{
120121
$positive = $negative = [];
121122

122-
\pcov\stop();
123+
pcov\stop();
123124

124-
foreach (\pcov\collect() as $file => $lines) {
125+
foreach (pcov\collect() as $file => $lines) {
125126
if (!file_exists($file)) {
126127
continue;
127128
}

src/Runner/info.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
if (isset($_SERVER['argv'][1])) {
3030
echo serialize($info);
31-
die();
31+
die;
3232
}
3333

3434
foreach ([

tests/Framework/Assert.count.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Assert::exception(function () {
3434
}, Tester\AssertException::class, '\'lorem ipsum\' should be array or countable object');
3535

3636
Assert::exception(function () {
37-
Assert::count(1, new \Exception('lorem ipsum'));
37+
Assert::count(1, new Exception('lorem ipsum'));
3838
}, Tester\AssertException::class, 'Exception Exception: lorem ipsum should be array or countable object');
3939

4040
Assert::exception(function () {

tests/Framework/Assert.equal.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ $equals = [
4646
[$obj3, $obj4],
4747
[[0 => 'a', 'str' => 'b'], ['str' => 'b', 0 => 'a']],
4848
[$deep1, $deep2],
49-
[\Tester\Expect::type('int'), 1],
49+
[Tester\Expect::type('int'), 1],
5050
];
5151

5252
$notEquals = [
5353
[1, 1.0],
5454
[INF, -INF],
5555
[['a', 'b'], ['b', 'a']],
5656
[NAN, NAN],
57-
[\Tester\Expect::type('int'), '1', 'string should be int'],
57+
[Tester\Expect::type('int'), '1', 'string should be int'],
5858
];
5959

6060

tests/Framework/Assert.hasKey.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ $array = [
1212
'one' => 'one',
1313
];
1414

15-
$string= 'Lorem ipsum';
15+
$string = 'Lorem ipsum';
1616

1717
Assert::hasKey(1, $array);
1818
Assert::hasKey('1', $array);

tests/Framework/Assert.match.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ foreach ($notMatches as [$expected, $actual, $expected2, $actual2]) {
9393

9494
$ex = Assert::exception(function () use ($expected, $actual) {
9595
Assert::match($expected, $actual);
96-
}, Tester\AssertException::class, Dumper::toLine($actual3) . " should match " . Dumper::toLine($expected3));
96+
}, Tester\AssertException::class, Dumper::toLine($actual3) . ' should match ' . Dumper::toLine($expected3));
9797

9898
Assert::same($expected2, $ex->expected);
9999
Assert::same($actual2, $ex->actual);

tests/Framework/Assert.noError.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ Assert::exception(function () {
2020

2121
Assert::exception(function () {
2222
Assert::noError(function () {
23-
throw new \Exception('Unexpected');
23+
throw new Exception('Unexpected');
2424
});
2525
}, Exception::class, 'Unexpected');
2626

2727

2828
Assert::exception(function () {
2929
Assert::noError(function () {
30-
throw new \Exception('Unexpected');
30+
throw new Exception('Unexpected');
3131
}, InvalidArgumentException::class);
3232
}, Exception::class, 'Tester\Assert::noError() expects 1 parameter, 2 given.');

tests/Framework/Assert.same.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $notSame = [
2121
[['a', 'b'], [1 => 'b', 0 => 'a']],
2222
[new stdClass, new stdClass],
2323
[[new stdClass], [new stdClass]],
24-
[\Tester\Expect::type('int'), 1],
24+
[Tester\Expect::type('int'), 1],
2525
];
2626

2727
foreach ($same as [$expected, $value]) {

tests/Framework/TestCase.dataProvider.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class MyTest extends Tester\TestCase
2525
public function dataProviderIterator()
2626
{
2727
$this->order[] = __METHOD__;
28-
return new \ArrayIterator([
28+
return new ArrayIterator([
2929
[1, 2],
3030
[3, 4],
3131
]);

tests/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
date_default_timezone_set('Europe/Prague');
1313

1414

15-
function test(\Closure $function): void
15+
function test(Closure $function): void
1616
{
1717
$function();
1818
}

0 commit comments

Comments
 (0)