Skip to content

Commit a6acc48

Browse files
committed
Mark internal timer API as final to discourage external usage
1 parent cc8995f commit a6acc48

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

src/Timer/Timer.php

+12-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,21 @@
22

33
namespace React\EventLoop\Timer;
44

5-
class Timer implements TimerInterface
5+
/**
6+
* The actual connection implementation for TimerInterface
7+
*
8+
* This class should only be used internally, see TimerInterface instead.
9+
*
10+
* @see TimerInterface
11+
* @internal
12+
*/
13+
final class Timer implements TimerInterface
614
{
715
const MIN_INTERVAL = 0.000001;
816

9-
protected $interval;
10-
protected $callback;
11-
protected $periodic;
17+
private $interval;
18+
private $callback;
19+
private $periodic;
1220

1321
/**
1422
* Constructor initializes the fields of the Timer

src/Timer/Timers.php

+9-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@
55
use SplObjectStorage;
66
use SplPriorityQueue;
77

8-
class Timers
8+
/**
9+
* A scheduler implementation that can hold multiple timer instances
10+
*
11+
* This class should only be used internally, see TimerInterface instead.
12+
*
13+
* @see TimerInterface
14+
* @internal
15+
*/
16+
final class Timers
917
{
1018
private $time;
1119
private $timers;

0 commit comments

Comments
 (0)