Skip to content

Commit 60b4e2b

Browse files
authored
Merge pull request #405 from FriendsOfSymfony/style
better format comment
2 parents 09a1e0a + 877e3bd commit 60b4e2b

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/Test/PHPUnit/AbstractCacheConstraint.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@
1414
use PHPUnit\Framework\Constraint\Constraint;
1515

1616
if (class_exists('PHPUnit_Runner_Version') && version_compare(\PHPUnit_Runner_Version::id(), '6.0.0', '<')) {
17+
/*
18+
* Using an early return instead of a else does not work when using the PHPUnit phar due to some weird PHP behavior
19+
* (the class gets defined without executing the code before it and so the definition is not properly conditional)
20+
*/
1721
class_alias('FOS\HttpCache\Test\Legacy\PHPUnit\AbstractCacheConstraint', 'FOS\HttpCache\Test\PHPUnit\AbstractCacheConstraint');
18-
// Using an early return instead of a else does not work when using the PHPUnit phar due to some weird PHP behavior
19-
// (the class gets defined without executing the code before it and so the definition is not properly conditional)
2022
} else {
2123
/**
2224
* Abstract cache constraint.

src/Test/WebServerListener.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@
1818
use PHPUnit\Framework\Warning;
1919

2020
if (class_exists('PHPUnit_Runner_Version') && version_compare(\PHPUnit_Runner_Version::id(), '6.0.0', '<')) {
21+
/*
22+
* Using an early return instead of a else does not work when using the PHPUnit phar due to some weird PHP behavior
23+
* (the class gets defined without executing the code before it and so the definition is not properly conditional)
24+
*/
2125
class_alias('FOS\HttpCache\Test\Legacy\WebServerListener', 'FOS\HttpCache\Test\WebServerListener');
22-
// Using an early return instead of a else does not work when using the PHPUnit phar due to some weird PHP behavior
23-
//(the class gets defined without executing the code before it and so the definition is not properly conditional)
2426
} else {
2527
/**
2628
* A PHPUnit test listener that starts and stops the PHP built-in web server.

0 commit comments

Comments
 (0)