Skip to content

Commit dd00e10

Browse files
Fix CS/WS issues
1 parent 1eeb948 commit dd00e10

File tree

7 files changed

+53
-19
lines changed

7 files changed

+53
-19
lines changed
Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
<?php
22

33
declare(strict_types=1);
4+
/*
5+
* This file is part of PHPUnit.
6+
*
7+
* (c) Sebastian Bergmann <[email protected]>
8+
*
9+
* For the full copyright and license information, please view the LICENSE
10+
* file that was distributed with this source code.
11+
*/
12+
require_once __DIR__ . '/src/Method.php';
413

5-
require_once __DIR__.'/src/Method.php';
6-
require_once __DIR__.'/src/FullyTestedClass.php';
7-
require_once __DIR__.'/src/functions.php';
14+
require_once __DIR__ . '/src/FullyTestedClass.php';
15+
16+
require_once __DIR__ . '/src/functions.php';

tests/end-to-end/code-coverage/code-coverage/src/FullyTestedClass.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
<?php
22

33
declare(strict_types=1);
4-
4+
/*
5+
* This file is part of PHPUnit.
6+
*
7+
* (c) Sebastian Bergmann <[email protected]>
8+
*
9+
* For the full copyright and license information, please view the LICENSE
10+
* file that was distributed with this source code.
11+
*/
512
namespace PHPUnit\TestFixture\CodeCoverage;
13+
614
/*
715
* This file is part of PHPUnit.
816
*

tests/end-to-end/code-coverage/code-coverage/src/Method.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* For the full copyright and license information, please view the LICENSE
1010
* file that was distributed with this source code.
1111
*/
12-
1312
namespace PHPUnit\TestFixture\CodeCoverage;
1413

1514
final class Method
@@ -19,13 +18,13 @@ public function greet(): string
1918
return $this->internalMethod();
2019
}
2120

22-
private function internalMethod(): string
21+
public function unusedPublicMethod(): string
2322
{
24-
return 'Hello, World!';
23+
return 'never returned';
2524
}
2625

27-
public function unusedPublicMethod(): string
26+
private function internalMethod(): string
2827
{
29-
return 'never returned';
28+
return 'Hello, World!';
3029
}
3130
}

tests/end-to-end/code-coverage/code-coverage/src/functions.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
<?php
22

33
declare(strict_types=1);
4-
4+
/*
5+
* This file is part of PHPUnit.
6+
*
7+
* (c) Sebastian Bergmann <[email protected]>
8+
*
9+
* For the full copyright and license information, please view the LICENSE
10+
* file that was distributed with this source code.
11+
*/
512
namespace PHPUnit\TestFixture\CodeCoverage;
613

714
/*
@@ -13,13 +20,11 @@
1320
* file that was distributed with this source code.
1421
*/
1522

16-
1723
function fixture_for_phpunit_code_coverage(): bool
1824
{
1925
return true;
2026
}
2127

22-
2328
function fixture_for_phpunit_code_coverage_not_called(): bool
2429
{
2530
return false;

tests/end-to-end/code-coverage/code-coverage/tests/FullyTestedClassTest.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
<?php
22

33
declare(strict_types=1);
4-
4+
/*
5+
* This file is part of PHPUnit.
6+
*
7+
* (c) Sebastian Bergmann <[email protected]>
8+
*
9+
* For the full copyright and license information, please view the LICENSE
10+
* file that was distributed with this source code.
11+
*/
512
namespace PHPUnit\TestFixture\CodeCoverage;
613

714
/*
@@ -14,9 +21,10 @@
1421
*/
1522

1623
use PHPUnit\Framework\Attributes\CoversClass;
24+
use PHPUnit\Framework\TestCase;
1725

18-
#[CoversClass(\PHPUnit\TestFixture\CodeCoverage\FullyTestedClass::class)]
19-
class FullyTestedClassTest extends \PHPUnit\Framework\TestCase
26+
#[CoversClass(FullyTestedClass::class)]
27+
class FullyTestedClassTest extends TestCase
2028
{
2129
public function testMethod(): void
2230
{

tests/end-to-end/code-coverage/code-coverage/tests/FunctionTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
<?php
22

33
declare(strict_types=1);
4-
4+
/*
5+
* This file is part of PHPUnit.
6+
*
7+
* (c) Sebastian Bergmann <[email protected]>
8+
*
9+
* For the full copyright and license information, please view the LICENSE
10+
* file that was distributed with this source code.
11+
*/
512
namespace PHPUnit\TestFixture\CodeCoverage;
613

714
/*
@@ -13,7 +20,6 @@
1320
* file that was distributed with this source code.
1421
*/
1522

16-
1723
use PHPUnit\Framework\Attributes\CoversFunction;
1824
use PHPUnit\Framework\TestCase;
1925

tests/end-to-end/code-coverage/code-coverage/tests/MethodTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@
99
* For the full copyright and license information, please view the LICENSE
1010
* file that was distributed with this source code.
1111
*/
12-
1312
namespace PHPUnit\TestFixture\CodeCoverage;
1413

1514
use PHPUnit\Framework\Attributes\CoversClass;
1615
use PHPUnit\Framework\TestCase;
1716

18-
#[CoversClass(\PHPUnit\TestFixture\CodeCoverage\Method::class)]
17+
#[CoversClass(Method::class)]
1918
final class MethodTest extends TestCase
2019
{
2120
public function testMethod(): void

0 commit comments

Comments
 (0)