Skip to content

Commit 53db43d

Browse files
committed
refactor: configure PHPStan to scan actual includes files instead of stubs
- Add includes/woocommerce-gateway-monei-core-functions.php to scanFiles - Remove monei_token_exits() stub from phpstan-bootstrap.php - PHPStan now scans actual function definitions instead of mocks
1 parent dd538d9 commit 53db43d

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

phpstan.neon

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ parameters:
1616
- public/
1717
- assets/
1818

19-
# Explicitly load WooCommerce stubs
19+
# Explicitly load WooCommerce stubs and plugin helper functions
2020
scanFiles:
2121
- vendor/php-stubs/woocommerce-stubs/woocommerce-stubs.php
2222
- tests/stubs/woocommerce-subscriptions-stubs.php
23+
- includes/woocommerce-gateway-monei-core-functions.php
2324

2425
# Scan MONEI SDK for type information
2526
scanDirectories:

tests/phpstan-bootstrap.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -198,14 +198,3 @@ public static function get_ip_address() {
198198
}
199199
}
200200
}
201-
202-
if ( ! function_exists( 'monei_token_exits' ) ) {
203-
/**
204-
* @param string $monei_token
205-
* @param string $gateway_id
206-
* @return bool
207-
*/
208-
function monei_token_exits( $monei_token, $gateway_id ) {
209-
return false;
210-
}
211-
}

0 commit comments

Comments
 (0)