1
1
<?php
2
+
2
3
/*
3
4
* Copyright 2023 Cloud Creativity Limited
4
5
*
28
29
29
30
class Config
30
31
{
31
-
32
32
/**
33
33
* Get the Stripe API Key.
34
34
*
@@ -65,13 +65,13 @@ public static function clientId()
65
65
/**
66
66
* Get the Connect account model.
67
67
*
68
- * @return StripeAccount| mixed
68
+ * @return mixed|StripeAccount
69
69
*/
70
70
public static function connectModel ()
71
71
{
72
72
$ class = self ::fqn ('connect.model ' );
73
73
74
- return new $ class ;
74
+ return new $ class() ;
75
75
}
76
76
77
77
/**
@@ -83,7 +83,7 @@ public static function connectOwner()
83
83
{
84
84
$ class = self ::fqn ('connect.owner ' );
85
85
86
- return new $ class ;
86
+ return new $ class() ;
87
87
}
88
88
89
89
/**
@@ -118,13 +118,13 @@ public static function connectErrorView()
118
118
}
119
119
120
120
/**
121
- * @return StripeEvent| mixed
121
+ * @return mixed|StripeEvent
122
122
*/
123
123
public static function webhookModel ()
124
124
{
125
125
$ class = self ::fqn ('webhooks.model ' );
126
126
127
- return new $ class ;
127
+ return new $ class() ;
128
128
}
129
129
130
130
/**
@@ -139,7 +139,7 @@ public static function webhookSigningSecrect($name)
139
139
throw new RuntimeException ("Webhook signing secret does not exist: {$ name }" );
140
140
}
141
141
142
- if (!is_string ($ secret )|| empty ($ secret )) {
142
+ if (!is_string ($ secret ) || empty ($ secret )) {
143
143
throw new RuntimeException ("Invalid webhook signing secret: {$ name }" );
144
144
}
145
145
@@ -168,7 +168,7 @@ public static function webhookQueue($type, $connect = false)
168
168
$ path = sprintf (
169
169
'webhooks.%s.%s ' ,
170
170
$ connect ? 'connect ' : 'account ' ,
171
- str_replace ('. ' , '_ ' , $ type )
171
+ str_replace ('. ' , '_ ' , $ type ),
172
172
);
173
173
174
174
return array_replace ([
@@ -242,7 +242,6 @@ public static function logExclude()
242
242
/**
243
243
* @param string $key
244
244
* @param mixed|null $default
245
- * @return mixed
246
245
*/
247
246
private static function get ($ key , $ default = null )
248
247
{
@@ -265,7 +264,6 @@ private static function fqn($key)
265
264
}
266
265
267
266
/**
268
- * @param $key
269
267
* @return bool
270
268
*/
271
269
private static function has ($ key )
0 commit comments