File tree Expand file tree Collapse file tree 8 files changed +27
-39
lines changed
Expand file tree Collapse file tree 8 files changed +27
-39
lines changed Original file line number Diff line number Diff line change 55final class ExtensionConfiguration
66{
77
8- /** @var bool */
9- public $ demo ;
10-
11- /** @var MerchantConfiguration */
12- public $ merchant ;
13-
14- public function __construct ()
8+ public function __construct (
9+ public bool $ demo = false ,
10+ public MerchantConfiguration $ merchant = new MerchantConfiguration (),
11+ )
1512 {
16- $ this ->merchant = new MerchantConfiguration ();
1713 }
1814
1915 public function setDemoMerchant (): void
Original file line number Diff line number Diff line change 55final class MerchantConfiguration
66{
77
8- /** @var string */
9- public $ gateUrl = 'https://www.thepay.cz/gate/ ' ;
8+ public string $ gateUrl = 'https://www.thepay.cz/gate/ ' ;
109
11- /** @var int */
12- public $ merchantId ;
10+ public int $ merchantId ;
1311
14- /** @var int */
15- public $ accountId ;
12+ public int $ accountId ;
1613
17- /** @var string */
18- public $ password ;
14+ public string $ password ;
1915
20- /** @var string */
21- public $ dataApiPassword ;
16+ public string $ dataApiPassword ;
2217
23- /** @var string */
24- public $ webServicesWsdl = 'https://www.thepay.cz/gate/api/gate-api.wsdl ' ;
18+ public string $ webServicesWsdl = 'https://www.thepay.cz/gate/api/gate-api.wsdl ' ;
2519
26- /** @var string */
27- public $ dataWebServicesWsdl = 'https://www.thepay.cz/gate/api/data.wsdl ' ;
20+ public string $ dataWebServicesWsdl = 'https://www.thepay.cz/gate/api/data.wsdl ' ;
2821
2922}
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ class ThePayExtension extends CompilerExtension
1818{
1919
2020 /** @var ExtensionConfiguration */
21- protected $ config ;
21+ protected $ config ; // phpcs:ignore SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint
2222
2323 public function __construct ()
2424 {
Original file line number Diff line number Diff line change 1717class DataApi
1818{
1919
20- /** @var MerchantConfig */
21- protected $ config ;
20+ protected MerchantConfig $ config ;
2221
2322 public function __construct (MerchantConfig $ config )
2423 {
@@ -68,12 +67,11 @@ public function getPayments(
6867 }
6968
7069 /**
71- * @param mixed $type
7270 * @throws InvalidSignatureException
7371 * @throws SoapException
7472 */
7573 public function setPaymentMethods (
76- $ type ,
74+ mixed $ type ,
7775 ?array $ paymentMethods = null
7876 ): SetPaymentMethodsResponse
7977 {
Original file line number Diff line number Diff line change 77class MerchantConfig extends TpMerchantConfig
88{
99
10- /** @var bool */
11- public $ isDemo = false ;
10+ public bool $ isDemo = false ;
1211
13- /** @var string */
14- public $ resourceUrl = 'https://www.thepay.cz/gate ' ;
12+ public string $ resourceUrl = 'https://www.thepay.cz/gate ' ;
1513
1614 public function isDemo (): bool
1715 {
Original file line number Diff line number Diff line change 1010class Payment extends TpPayment
1111{
1212
13- /** @var LinkGenerator */
14- protected $ linkGenerator ;
13+ protected LinkGenerator $ linkGenerator ;
1514
1615 public function __construct (
1716 MerchantConfig $ config ,
@@ -24,6 +23,7 @@ public function __construct(
2423 }
2524
2625 /**
26+ * @param mixed[] $params
2727 * @throws InvalidLinkException
2828 */
2929 public function setReturnUrl (
@@ -39,6 +39,7 @@ public function setReturnUrl(
3939 }
4040
4141 /**
42+ * @param mixed[] $params
4243 * @throws InvalidLinkException
4344 */
4445 public function setBackToEshopUrl (
Original file line number Diff line number Diff line change 88class PermanentPayment extends Tp \PermanentPayment
99{
1010
11- /** @var LinkGenerator */
12- protected $ linkGenerator ;
11+ protected LinkGenerator $ linkGenerator ;
1312
1413 public function __construct (
1514 MerchantConfig $ config ,
@@ -48,6 +47,9 @@ public function getReturnUrl(): string
4847 return $ this ->returnUrl ;
4948 }
5049
50+ /**
51+ * @param mixed[] $params
52+ */
5153 public function setReturnUrl (string $ returnUrl , array $ params = []): void
5254 {
5355 if (preg_match ('~^([\w:]+):(\w*+)(#.*)?()\z~ ' , $ returnUrl ) === 1 ) {
Original file line number Diff line number Diff line change 1010class ReturnedPayment extends Tp \ReturnedPayment
1111{
1212
13- /** @var IRequest */
14- protected $ request ;
13+ protected IRequest $ request ;
1514
16- /** @var LinkGenerator */
17- protected $ linkGenerator ;
15+ protected LinkGenerator $ linkGenerator ;
1816
1917 public function __construct (
2018 MerchantConfig $ config ,
@@ -30,6 +28,7 @@ public function __construct(
3028 }
3129
3230 /**
31+ * @param mixed[] $params
3332 * @throws InvalidLinkException
3433 */
3534 public function setReturnUrl (
@@ -45,6 +44,7 @@ public function setReturnUrl(
4544 }
4645
4746 /**
47+ * @param mixed[] $params
4848 * @throws InvalidLinkException
4949 */
5050 public function setBackToEshopUrl (
You can’t perform that action at this time.
0 commit comments