Skip to content

Commit

Permalink
Mark all classes as final
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus committed Jul 11, 2019
1 parent bf165f1 commit eae3215
Show file tree
Hide file tree
Showing 18 changed files with 18 additions and 18 deletions.
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

2 comments on commit eae3215

@webdevmatics

This comment was marked as off-topic.

@WyriHaximus
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a) We did, but we simply can't just test all dependants out there, especially when it's not listed on https://packagist.org/packages/react/dns/dependents because react/dns is an indirect dependency.
b) This is a major release which allows for BC breaks.

Please sign in to comment.