diff --git a/src/ExtEventLoop.php b/src/ExtEventLoop.php index 73e7e97c..a83950d2 100644 --- a/src/ExtEventLoop.php +++ b/src/ExtEventLoop.php @@ -20,7 +20,7 @@ * * @link https://pecl.php.net/package/event */ -class ExtEventLoop implements LoopInterface +final class ExtEventLoop implements LoopInterface { private $eventBase; private $futureTickQueue; diff --git a/src/ExtLibevLoop.php b/src/ExtLibevLoop.php index 93af0cd9..32f8c5bd 100644 --- a/src/ExtLibevLoop.php +++ b/src/ExtLibevLoop.php @@ -24,7 +24,7 @@ * @see https://github.com/m4rw3r/php-libev * @see https://gist.github.com/1688204 */ -class ExtLibevLoop implements LoopInterface +final class ExtLibevLoop implements LoopInterface { private $loop; private $futureTickQueue; diff --git a/src/ExtLibeventLoop.php b/src/ExtLibeventLoop.php index 08896b4f..01528cb9 100644 --- a/src/ExtLibeventLoop.php +++ b/src/ExtLibeventLoop.php @@ -33,8 +33,9 @@ * * @link https://pecl.php.net/package/libevent */ -class ExtLibeventLoop implements LoopInterface +final class ExtLibeventLoop implements LoopInterface { + /** @internal */ const MICROSECONDS_PER_SECOND = 1000000; private $eventBase; diff --git a/src/Factory.php b/src/Factory.php index b497667d..1a56877d 100644 --- a/src/Factory.php +++ b/src/Factory.php @@ -5,7 +5,7 @@ /** * The `Factory` class exists as a convenient way to pick the best available event loop implementation. */ -class Factory +final class Factory { /** * Creates a new event loop instance diff --git a/src/StreamSelectLoop.php b/src/StreamSelectLoop.php index 93802493..146cff55 100644 --- a/src/StreamSelectLoop.php +++ b/src/StreamSelectLoop.php @@ -50,8 +50,9 @@ * * @link http://php.net/manual/en/function.stream-select.php */ -class StreamSelectLoop implements LoopInterface +final class StreamSelectLoop implements LoopInterface { + /** @internal */ const MICROSECONDS_PER_SECOND = 1000000; private $futureTickQueue; @@ -268,7 +269,7 @@ private function waitForStreamActivity($timeout) * @return integer|false The total number of streams that are ready for read/write. * Can return false if stream_select() is interrupted by a signal. */ - protected function streamSelect(array &$read, array &$write, $timeout) + private function streamSelect(array &$read, array &$write, $timeout) { if ($read || $write) { $except = null;