Skip to content

Commit

Permalink
Make all classes final.
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed May 3, 2024
1 parent 6de1dbb commit 05a4911
Show file tree
Hide file tree
Showing 32 changed files with 39 additions and 32 deletions.
2 changes: 1 addition & 1 deletion src/AddressTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @version 2.1.9
* @since 2.0.2
*/
class AddressTransformer {
final class AddressTransformer {
/**
* Transform Pronamic address to OmniKassa 2.0 address.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @version 2.3.4
* @since 1.0.0
*/
class Client {
final class Client {
/**
* URL OmniKassa API.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* @version 2.1.8
* @since 1.0.0
*/
class Config extends GatewayConfig implements JsonSerializable {
final class Config extends GatewayConfig implements JsonSerializable {
/**
* Post ID.
*
Expand Down
3 changes: 2 additions & 1 deletion src/CustomerInformation.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
namespace Pronamic\WordPress\Pay\Gateways\OmniKassa2;

use DateTimeInterface;
use JsonSerializable;

/**
* Customer information.
Expand All @@ -19,7 +20,7 @@
* @version 2.2.4
* @since 2.0.2
*/
class CustomerInformation implements \JsonSerializable {
final class CustomerInformation implements JsonSerializable {
/**
* The e-mailadress of the consumer.
*
Expand Down
2 changes: 1 addition & 1 deletion src/DataHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* @version 2.1.9
* @since 2.0.2
*/
class DataHelper {
final class DataHelper {
/**
* Strictly alphanumerical (letters and numbers only).
*
Expand Down
2 changes: 1 addition & 1 deletion src/Error.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @version 2.1.10
* @since 2.0.2
*/
class Error extends \Exception {
final class Error extends \Exception {
/**
* Error code.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @version 2.3.4
* @since 1.0.0
*/
class Gateway extends Core_Gateway {
final class Gateway extends Core_Gateway {
/**
* Client.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Gender.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @since 2.1.0
* @version 2.0.4
*/
class Gender {
final class Gender {
/**
* Female.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Integration.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @version 2.3.4
* @since 1.0.0
*/
class Integration extends AbstractGatewayIntegration {
final class Integration extends AbstractGatewayIntegration {
/**
* REST route namespace.
*
Expand Down
2 changes: 1 addition & 1 deletion src/InvalidSignatureException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
* @version 2.3.3
* @since 2.3.3
*/
class InvalidSignatureException extends \Exception {
final class InvalidSignatureException extends \Exception {

}
2 changes: 1 addition & 1 deletion src/Money.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @version 2.1.8
* @since 2.0.2
*/
class Money implements \JsonSerializable {
final class Money implements \JsonSerializable {
/**
* Currency.
*
Expand Down
2 changes: 1 addition & 1 deletion src/MoneyTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @version 2.1.8
* @since 2.0.2
*/
class MoneyTransformer {
final class MoneyTransformer {
/**
* Transform Pronamic money to OmniKassa 2.0 money.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @version 2.1.10
* @since 2.0.2
*/
class Notification extends ResponseMessage {
final class Notification extends ResponseMessage {
/**
* The token that can be used to do the status pull.
*
Expand Down
2 changes: 1 addition & 1 deletion src/ObjectAccess.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/**
* Object access class
*/
class ObjectAccess {
final class ObjectAccess {
/**
* Object.
*
Expand Down
2 changes: 1 addition & 1 deletion src/OrderAnnounceResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @version 2.2.4
* @since 2.0.2
*/
class OrderAnnounceResponse extends ResponseMessage {
final class OrderAnnounceResponse extends ResponseMessage {
/**
* OmniKassa order ID.
*
Expand Down
4 changes: 3 additions & 1 deletion src/OrderItems.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@

namespace Pronamic\WordPress\Pay\Gateways\OmniKassa2;

use JsonSerializable;

/**
* Order items.
*
* @author Reüel van der Steege
* @version 2.1.8
* @since 2.0.3
*/
class OrderItems implements \JsonSerializable {
final class OrderItems implements JsonSerializable {
/**
* Order items.
*
Expand Down
4 changes: 3 additions & 1 deletion src/OrderResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@

namespace Pronamic\WordPress\Pay\Gateways\OmniKassa2;

use JsonSerializable;

/**
* Order result
*
* @author Remco Tolsma
* @version 2.1.8
* @since 2.0.2
*/
class OrderResult implements \JsonSerializable {
final class OrderResult implements JsonSerializable {
/**
* OrderId as delivered during the Order Announce.
*
Expand Down
4 changes: 3 additions & 1 deletion src/OrderResults.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

namespace Pronamic\WordPress\Pay\Gateways\OmniKassa2;

use IteratorAggregate;

/**
* Order results.
*
Expand All @@ -18,7 +20,7 @@
* @since 1.0.0
* @phpstan-implements \IteratorAggregate<int, OrderResult>
*/
class OrderResults extends ResponseMessage implements \IteratorAggregate {
final class OrderResults extends ResponseMessage implements IteratorAggregate {
/**
* More order results available flag.
*
Expand Down
2 changes: 1 addition & 1 deletion src/OrderStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* Order status class
*/
class OrderStatus {
final class OrderStatus {
/**
* Successful payment of the order.
*
Expand Down
2 changes: 1 addition & 1 deletion src/PaymentBrandForce.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @version 2.1.0
* @since 1.0.0
*/
class PaymentBrandForce {
final class PaymentBrandForce {
/**
* In the case of FORCE_ONCE, the indicated paymentBrand is only enforced on the first
* transaction. If this fails, the consumer can still choose another payment method.
Expand Down
2 changes: 1 addition & 1 deletion src/PaymentBrands.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @version 2.1.8
* @since 1.0.0
*/
class PaymentBrands {
final class PaymentBrands {
/**
* Payment brand 'IDEAL'.
*
Expand Down
2 changes: 1 addition & 1 deletion src/ProductCategories.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @version 2.1.8
* @since 2.0.4
*/
class ProductCategories {
final class ProductCategories {
/**
* Product category 'PHYSICAL'.
*
Expand Down
2 changes: 1 addition & 1 deletion src/RefundRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* Refund request class
*/
class RefundRequest implements IdempotenceInterface, JsonSerializable {
final class RefundRequest implements IdempotenceInterface, JsonSerializable {
/**
* Transaction ID.
*
Expand Down
2 changes: 1 addition & 1 deletion src/RefundResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/**
* Refund response class
*/
class RefundResponse {
final class RefundResponse {
/**
* Refund ID.
*
Expand Down
2 changes: 1 addition & 1 deletion src/ReturnController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* Return controller class
*/
class ReturnController {
final class ReturnController {
/**
* Integration.
*
Expand Down
2 changes: 1 addition & 1 deletion src/ReturnParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @version 2.1.8
* @since 2.0.2
*/
class ReturnParameters extends ResponseMessage {
final class ReturnParameters extends ResponseMessage {
/**
* The "merchantOrderId" as used in the Order announce.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Security.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @version 2.1.8
* @since 1.0.0
*/
class Security {
final class Security {
/**
* Get signature fields combined.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Statuses.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @version 2.1.0
* @since 1.0.0
*/
class Statuses {
final class Statuses {
/**
* Cancelled.
*
Expand Down
2 changes: 1 addition & 1 deletion src/TransactionStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/**
* Transaction status class
*/
class TransactionStatus {
final class TransactionStatus {
/**
* Success.
*
Expand Down
2 changes: 1 addition & 1 deletion src/UnknownOrderIdsException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
* @version 2.3.4
* @since 2.3.4
*/
class UnknownOrderIdsException extends \Exception {
final class UnknownOrderIdsException extends \Exception {

}
2 changes: 1 addition & 1 deletion src/VatCategories.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @version 2.1.8
* @since 2.0.4
*/
class VatCategories {
final class VatCategories {
/**
* Category 'Hoog'.
*
Expand Down
2 changes: 1 addition & 1 deletion src/WebhookController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* @version 2.3.4
* @since 2.3.0
*/
class WebhookController {
final class WebhookController {
/**
* Setup.
*
Expand Down

0 comments on commit 05a4911

Please sign in to comment.