Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7c04a82

Browse filesBrowse files
committed
bug #33675 [PhpUnit] Fix usleep mock return value (fabpot)
This PR was merged into the 3.4 branch. Discussion ---------- [PhpUnit] Fix usleep mock return value | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | n/a| License | MIT | Doc PR | n/a `usleep` does not return anything. Commits ------- 8198d93 [PhpUnit] Fix usleep mock return value
2 parents d273ee8 + 8198d93 commit 7c04a82
Copy full SHA for 7c04a82

File tree

1 file changed

+4
-6
lines changed
Filter options

1 file changed

+4
-6
lines changed

‎src/Symfony/Bridge/PhpUnit/ClockMock.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/ClockMock.php
+4-6Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,10 @@ public static function sleep($s)
5252
public static function usleep($us)
5353
{
5454
if (null === self::$now) {
55-
return \usleep($us);
55+
\usleep($us);
56+
} else {
57+
self::$now += $us / 1000000;
5658
}
57-
58-
self::$now += $us / 1000000;
59-
60-
return null;
6159
}
6260

6361
public static function microtime($asFloat = false)
@@ -108,7 +106,7 @@ function sleep(\$s)
108106
109107
function usleep(\$us)
110108
{
111-
return \\$self::usleep(\$us);
109+
\\$self::usleep(\$us);
112110
}
113111
114112
EOPHP

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.