2025-01-10 17:46:57 +04:00
|
|
|
<?php
|
2025-01-15 14:10:05 +04:00
|
|
|
/**
|
|
|
|
* The PHP-Scoper configuration.
|
|
|
|
*
|
|
|
|
* @package WooCommerce\PayPalCommerce
|
|
|
|
*/
|
2025-01-10 17:46:57 +04:00
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
use Isolated\Symfony\Component\Finder\Finder;
|
|
|
|
|
2025-01-15 16:02:29 +04:00
|
|
|
$wp_classes = json_decode(
|
|
|
|
file_get_contents(
|
|
|
|
__DIR__ . '/vendor/sniccowp/php-scoper-wordpress-excludes/generated/exclude-wordpress-classes.json'
|
2025-01-15 15:27:15 +04:00
|
|
|
),
|
2025-01-15 16:02:29 +04:00
|
|
|
true
|
|
|
|
);
|
|
|
|
$wp_constants = json_decode(
|
|
|
|
file_get_contents(
|
|
|
|
__DIR__ . '/vendor/sniccowp/php-scoper-wordpress-excludes/generated/exclude-wordpress-constants.json'
|
2025-01-15 15:27:15 +04:00
|
|
|
),
|
2025-01-15 16:02:29 +04:00
|
|
|
true
|
|
|
|
);
|
|
|
|
$wp_functions = json_decode(
|
|
|
|
file_get_contents(
|
|
|
|
__DIR__ . '/vendor/sniccowp/php-scoper-wordpress-excludes/generated/exclude-wordpress-functions.json'
|
2025-01-15 12:17:59 +04:00
|
|
|
),
|
2025-01-15 16:02:29 +04:00
|
|
|
true
|
|
|
|
);
|
|
|
|
|
|
|
|
$finders = array(
|
|
|
|
Finder::create()
|
|
|
|
->files()
|
|
|
|
->ignoreVCS( true )
|
|
|
|
->ignoreDotFiles( false ) // We need to keep .distignore around.
|
|
|
|
->exclude(
|
|
|
|
array(
|
|
|
|
'.github',
|
|
|
|
'.ddev',
|
|
|
|
'.idea',
|
|
|
|
'.psalm',
|
|
|
|
'tests',
|
|
|
|
)
|
|
|
|
)
|
|
|
|
->in( '.' ),
|
|
|
|
);
|
|
|
|
|
|
|
|
return array(
|
|
|
|
'prefix' => 'WooCommerce\\PayPalCommerce\\Vendor',
|
|
|
|
'finders' => $finders,
|
|
|
|
'patchers' => array(),
|
|
|
|
'exclude-files' => array(
|
|
|
|
'vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php',
|
|
|
|
), // list<string>.
|
|
|
|
'exclude-namespaces' => array(
|
|
|
|
'WooCommerce\PayPalCommerce',
|
|
|
|
'Composer',
|
|
|
|
'Automattic',
|
|
|
|
'^WooCommerce',
|
|
|
|
), // list<string|regex>.
|
|
|
|
'exclude-constants' => array_merge(
|
|
|
|
$wp_constants,
|
|
|
|
array(
|
|
|
|
'WC_VERSION',
|
|
|
|
)
|
|
|
|
), // list<string|regex>.
|
|
|
|
'exclude-classes' => array_merge(
|
|
|
|
$wp_classes,
|
|
|
|
array(
|
|
|
|
'WooCommerce',
|
|
|
|
'/^WC_/',
|
|
|
|
)
|
|
|
|
), // list<string|regex>.
|
|
|
|
'exclude-functions' => array_merge(
|
|
|
|
$wp_functions,
|
|
|
|
array(
|
|
|
|
'/^wc/',
|
|
|
|
)
|
|
|
|
), // list<string|regex>.
|
|
|
|
|
|
|
|
'expose-global-constants' => false, // bool.
|
|
|
|
'expose-global-classes' => false, // bool.
|
|
|
|
'expose-global-functions' => false, // bool.
|
|
|
|
|
|
|
|
'expose-namespaces' => array(), // list<string|regex>.
|
|
|
|
'expose-constants' => array(), // list<string|regex>.
|
|
|
|
'expose-classes' => array(), // list<string|regex>.
|
|
|
|
'expose-functions' => array(), // list<string|regex>.
|
2025-01-15 12:17:59 +04:00
|
|
|
);
|