8000 Mark all classes as final to discourage inheritance by clue · Pull Request #131 · reactphp/event-loop · GitHub
[go: up one dir, main page]

Skip to content

Mark all classes as final to discourage inheritance #131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ExtEventLoop.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*
* @link https://pecl.php.net/package/event
*/
class ExtEventLoop implements LoopInterface
final class ExtEventLoop implements LoopInterface
{
private $eventBase;
private $futureTickQueue;
Expand Down
2 changes: 1 addition & 1 deletion src/ExtLibevLoop.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/ExtLibeventLoop.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
8000 Expand Down
2 changes: 1 addition & 1 deletion src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions src/StreamSelectLoop.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
0