Skip to content

Mark all classes as final to discourage inheritance #134

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 1 commit into from
Jul 11, 2019
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/BadServerException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

namespace React\Dns;

class BadServerException extends \Exception
final class BadServerException extends \Exception
{
}
2 changes: 1 addition & 1 deletion src/Config/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use RuntimeException;

class Config
final class Config
{
/**
* Loads the system DNS configuration
Expand Down
2 changes: 1 addition & 1 deletion src/Model/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @link https://tools.ietf.org/html/rfc1035#section-4.1.1
*/
class Message
final class Message
{
const TYPE_A = 1;
const TYPE_NS = 2;
Expand Down
2 changes: 1 addition & 1 deletion src/Model/Record.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* @link https://tools.ietf.org/html/rfc1035#section-4.1.3
* @see \React\Dns\Query\Query
*/
class Record
final class Record
{
/**
* @var string hostname without trailing dot, for example "reactphp.org"
Expand Down
2 changes: 1 addition & 1 deletion src/Protocol/BinaryDumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use React\Dns\Model\Record;
use React\Dns\Query\Query;

class BinaryDumper
final class BinaryDumper
{
/**
* @param Message $message
Expand Down
2 changes: 1 addition & 1 deletion src/Protocol/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* Obsolete and uncommon types and classes are not implemented.
*/
class Parser
final class Parser
{
/**
* Parses the given raw binary message into a Message object
Expand Down
2 changes: 1 addition & 1 deletion src/Query/CachingExecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use React\Dns\Model\Message;
use React\Promise\Promise;

class CachingExecutor implements ExecutorInterface
final class CachingExecutor implements ExecutorInterface
{
/**
* Default TTL for negative responses (NXDOMAIN etc.).
Expand Down
2 changes: 1 addition & 1 deletion src/Query/CancellationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

namespace React\Dns\Query;

class CancellationException extends \RuntimeException
final class CancellationException extends \RuntimeException
{
}
2 changes: 1 addition & 1 deletion src/Query/CoopExecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* );
* ```
*/
class CoopExecutor implements ExecutorInterface
final class CoopExecutor implements ExecutorInterface
{
private $executor;
private $pending = array();
Expand Down
2 changes: 1 addition & 1 deletion src/Query/HostsFileExecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* DNS executor. If the host is not found in the hosts file, it will be passed
* to the DNS executor as a fallback.
*/
class HostsFileExecutor implements ExecutorInterface
final class HostsFileExecutor implements ExecutorInterface
{
private $hosts;
private $fallback;
Expand Down
2 changes: 1 addition & 1 deletion src/Query/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* @link https://tools.ietf.org/html/rfc1035#section-4.1.2
* @see \React\Dns\Message\Record
*/
class Query
final class Query
{
/**
* @var string query name, i.e. hostname to look up
Expand Down
2 changes: 1 addition & 1 deletion src/Query/RetryExecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use React\Promise\CancellablePromiseInterface;
use React\Promise\Deferred;

class RetryExecutor implements ExecutorInterface
final class RetryExecutor implements ExecutorInterface
{
private $executor;
private $retries;
Expand Down
2 changes: 1 addition & 1 deletion src/Query/TimeoutException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

namespace React\Dns\Query;

class TimeoutException extends \Exception
final class TimeoutException extends \Exception
{
}
2 changes: 1 addition & 1 deletion src/Query/TimeoutExecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use React\Promise\CancellablePromiseInterface;
use React\Promise\Timer;

class TimeoutExecutor implements ExecutorInterface
final class TimeoutExecutor implements ExecutorInterface
{
private $executor;
private $loop;
Expand Down
2 changes: 1 addition & 1 deletion src/Query/UdpTransportExecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
* packages. Higher-level components should take advantage of the Datagram
* component instead of reimplementing this socket logic from scratch.
*/
class UdpTransportExecutor implements ExecutorInterface
final class UdpTransportExecutor implements ExecutorInterface
{
private $loop;
private $parser;
Expand Down
2 changes: 1 addition & 1 deletion src/RecordNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

namespace React\Dns;

class RecordNotFoundException extends \Exception
final class RecordNotFoundException extends \Exception
{
}
2 changes: 1 addition & 1 deletion src/Resolver/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use React\Dns\Query\UdpTransportExecutor;
use React\EventLoop\LoopInterface;

class Factory
final class Factory
{
public function create($nameserver, LoopInterface $loop)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Resolver/Resolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use React\Dns\RecordNotFoundException;
use React\Promise\PromiseInterface;

class Resolver
final class Resolver
{
private $executor;

Expand Down