From 57dc09ae26b7cc12a7559bca7c9062d881744695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Mon, 4 Dec 2017 12:47:01 +0100 Subject: [PATCH 1/2] Mark internal API as private --- src/ExtLibeventLoop.php | 1 + src/StreamSelectLoop.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ExtLibeventLoop.php b/src/ExtLibeventLoop.php index 08896b4f..9bff9db7 100644 --- a/src/ExtLibeventLoop.php +++ b/src/ExtLibeventLoop.php @@ -35,6 +35,7 @@ */ class ExtLibeventLoop implements LoopInterface { + /** @internal */ const MICROSECONDS_PER_SECOND = 1000000; private $eventBase; diff --git a/src/StreamSelectLoop.php b/src/StreamSelectLoop.php index 93802493..341b3716 100644 --- a/src/StreamSelectLoop.php +++ b/src/StreamSelectLoop.php @@ -52,6 +52,7 @@ */ 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; From 578ee5db1bcd8cd0a252f86cbddd6efc94c06fe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Mon, 4 Dec 2017 12:45:40 +0100 Subject: [PATCH 2/2] Mark all classes as final --- src/ExtEventLoop.php | 2 +- src/ExtLibevLoop.php | 2 +- src/ExtLibeventLoop.php | 2 +- src/Factory.php | 2 +- src/StreamSelectLoop.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) 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 9bff9db7..01528cb9 100644 --- a/src/ExtLibeventLoop.php +++ b/src/ExtLibeventLoop.php @@ -33,7 +33,7 @@ * * @link https://pecl.php.net/package/libevent */ -class ExtLibeventLoop implements LoopInterface +final class ExtLibeventLoop implements LoopInterface { /** @internal */ const MICROSECONDS_PER_SECOND = 1000000; 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 341b3716..146cff55 100644 --- a/src/StreamSelectLoop.php +++ b/src/StreamSelectLoop.php @@ -50,7 +50,7 @@ * * @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; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy