Skip to content
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 AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ assets/ # JS, CSS, images, fonts
classes or interfaces** — external addons extend these classes and PHP will fatal if
the child class doesn't declare the same return type. Use `@return` PHPDoc tags instead.
This applies to all classes in `inc/gateways/`, `inc/ui/class-base-element.php`,
`inc/models/class-base-model.php`, `inc/integrations/`, and `inc/checkout/signup-fields/`.
`inc/models/class-base-model.php`, `inc/integrations/`, and `inc/checkout/`.
Private and final methods may use PHP return types freely.
- **PHPDoc**: Required on classes and public methods in `inc/`. Not required in `tests/`.
Every file header: `@package WP_Ultimo`, `@subpackage`, `@since`.
Expand Down
4 changes: 2 additions & 2 deletions inc/gateways/class-base-gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ public function supports_payment_polling() {
* @param int $payment_id The local payment ID to verify.
* @return array{success: bool, status: string, message: string}
*/
public function verify_and_complete_payment($payment_id) {
public function verify_and_complete_payment(int $payment_id) {

unset($payment_id);

Expand Down Expand Up @@ -823,7 +823,7 @@ public function get_confirm_url() {
* @param string $message The error message.
* @return void
*/
public function redirect_with_error($message) {
public function redirect_with_error(string $message) {

$url = remove_query_arg(['wu-confirm', 'payment', 'token', 'PayerID', 'ba_token', 'subscription_id', 'status'], $this->return_url ?: wu_get_current_url());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public function add_cloudflare_dns_entries($dns_records, $domain) {
*
* @since 2.0.0
*/
public function detect(): bool {
public function detect() {
/**
* As Cloudflare recently enabled wildcards for all customers, this integration is no longer required.
* https://blog.cloudflare.com/wildcard-proxy-for-everyone/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class CPanel_Host_Provider extends Base_Host_Provider {
*
* @since 2.0.0
*/
public function detect(): bool {
public function detect() {

return false;
}
Expand Down Expand Up @@ -262,7 +262,7 @@ public function load_api() {
* @since 1.6.2
* @param null|int $site_id The site id.
*/
public function get_site_url($site_id = null): string {
public function get_site_url($site_id = null) {

return trim(preg_replace('#^https?://#', '', get_site_url($site_id)), '/');
}
Expand Down
2 changes: 1 addition & 1 deletion inc/integrations/interface-capability-module.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function get_supported_features();
* @param string $feature Feature identifier to check.
* @return bool
*/
public function supports($feature);
public function supports(string $feature);

/**
* Registers WordPress hooks for this capability.
Expand Down
2 changes: 1 addition & 1 deletion inc/ui/class-billing-info-element.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ public function setup_preview() {
*
* @param array $atts Parameters of the block/shortcode.
* @param string|null $content The content inside the shortcode.
* @return string
* @return void
*/
public function output($atts, $content = null) {

Expand Down
Loading