Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/wp-smush.../core/external/wpmudev-...
File: scoper.inc.php
<?php
[0] Fix | Delete
[1] Fix | Delete
declare( strict_types=1 );
[2] Fix | Delete
[3] Fix | Delete
use Isolated\Symfony\Component\Finder\Finder;
[4] Fix | Delete
[5] Fix | Delete
// You can do your own things here, e.g. collecting symbols to expose dynamically
[6] Fix | Delete
// or files to exclude.
[7] Fix | Delete
// However beware that this file is executed by PHP-Scoper, hence if you are using
[8] Fix | Delete
// the PHAR it will be loaded by the PHAR. So it is highly recommended to avoid
[9] Fix | Delete
// to auto-load any code here: it can result in a conflict or even corrupt
[10] Fix | Delete
// the PHP-Scoper analysis.
[11] Fix | Delete
[12] Fix | Delete
return [
[13] Fix | Delete
// The prefix configuration. If a non null value is be used, a random prefix
[14] Fix | Delete
// will be generated instead.
[15] Fix | Delete
//
[16] Fix | Delete
// For more see: https://github.com/humbug/php-scoper/blob/master/docs/configuration.md#prefix
[17] Fix | Delete
'prefix' => 'WPMUDEV_Analytics_Vendor',
[18] Fix | Delete
[19] Fix | Delete
// By default when running php-scoper add-prefix, it will prefix all relevant code found in the current working
[20] Fix | Delete
// directory. You can however define which files should be scoped by defining a collection of Finders in the
[21] Fix | Delete
// following configuration key.
[22] Fix | Delete
//
[23] Fix | Delete
// This configuration entry is completely ignored when using Box.
[24] Fix | Delete
//
[25] Fix | Delete
// For more see: https://github.com/humbug/php-scoper/blob/master/docs/configuration.md#finders-and-paths
[26] Fix | Delete
'finders' => [
[27] Fix | Delete
Finder::create()
[28] Fix | Delete
->files()
[29] Fix | Delete
->ignoreVCS( true )
[30] Fix | Delete
->notName( '/LICENSE|.*\\.md|.*\\.dist|.*\\.yml|Makefile|.gitignore|composer\\.json|MobileDetect\\.json|composer\\.lock/' )
[31] Fix | Delete
->exclude( [
[32] Fix | Delete
'doc',
[33] Fix | Delete
'docs',
[34] Fix | Delete
'test',
[35] Fix | Delete
'tests',
[36] Fix | Delete
'examples',
[37] Fix | Delete
] )
[38] Fix | Delete
->in( [
[39] Fix | Delete
'vendor/mixpanel/mixpanel-php',
[40] Fix | Delete
] ),
[41] Fix | Delete
],
[42] Fix | Delete
[43] Fix | Delete
// List of excluded files, i.e. files for which the content will be left untouched.
[44] Fix | Delete
// Paths are relative to the configuration file unless if they are already absolute
[45] Fix | Delete
//
[46] Fix | Delete
// For more see: https://github.com/humbug/php-scoper/blob/master/docs/configuration.md#patchers
[47] Fix | Delete
'exclude-files' => [
[48] Fix | Delete
/*'src/a-whitelisted-file.php',*/
[49] Fix | Delete
],
[50] Fix | Delete
[51] Fix | Delete
// When scoping PHP files, there will be scenarios where some of the code being scoped indirectly references the
[52] Fix | Delete
// original namespace. These will include, for example, strings or string manipulations. PHP-Scoper has limited
[53] Fix | Delete
// support for prefixing such strings. To circumvent that, you can define patchers to manipulate the file to your
[54] Fix | Delete
// heart contents.
[55] Fix | Delete
//
[56] Fix | Delete
// For more see: https://github.com/humbug/php-scoper/blob/master/docs/configuration.md#patchers
[57] Fix | Delete
'patchers' => [
[58] Fix | Delete
static function ( string $filePath, string $prefix, string $content ): string {
[59] Fix | Delete
$class_names = array(
[60] Fix | Delete
'ConsumerStrategies_AbstractConsumer',
[61] Fix | Delete
'ConsumerStrategies_FileConsumer',
[62] Fix | Delete
'ConsumerStrategies_CurlConsumer',
[63] Fix | Delete
'ConsumerStrategies_SocketConsumer',
[64] Fix | Delete
'Producers_MixpanelBaseProducer',
[65] Fix | Delete
'Producers_MixpanelEvents',
[66] Fix | Delete
'Producers_MixpanelGroups',
[67] Fix | Delete
'Producers_MixpanelPeople',
[68] Fix | Delete
);
[69] Fix | Delete
$pattern = '~([\'"])(' . join( '|', $class_names ) . ')\1~';
[70] Fix | Delete
[71] Fix | Delete
return preg_replace( $pattern, '$1WPMUDEV_Analytics_Vendor\\\$2$1', $content );
[72] Fix | Delete
},
[73] Fix | Delete
],
[74] Fix | Delete
[75] Fix | Delete
// List of symbols to consider internal i.e. to leave untouched.
[76] Fix | Delete
//
[77] Fix | Delete
// For more information see: https://github.com/humbug/php-scoper/blob/master/docs/configuration.md#excluded-symbols
[78] Fix | Delete
'exclude-namespaces' => [
[79] Fix | Delete
// 'Acme\Foo' // The Acme\Foo namespace (and sub-namespaces)
[80] Fix | Delete
// '~^PHPUnit\\\\Framework$~', // The whole namespace PHPUnit\Framework (but not sub-namespaces)
[81] Fix | Delete
// '~^$~', // The root namespace only
[82] Fix | Delete
// '', // Any namespace
[83] Fix | Delete
],
[84] Fix | Delete
'exclude-classes' => [
[85] Fix | Delete
// 'ReflectionClassConstant',
[86] Fix | Delete
],
[87] Fix | Delete
'exclude-functions' => [
[88] Fix | Delete
// 'mb_str_split',
[89] Fix | Delete
],
[90] Fix | Delete
'exclude-constants' => [
[91] Fix | Delete
// 'STDIN',
[92] Fix | Delete
],
[93] Fix | Delete
[94] Fix | Delete
// List of symbols to expose.
[95] Fix | Delete
//
[96] Fix | Delete
// For more information see: https://github.com/humbug/php-scoper/blob/master/docs/configuration.md#exposed-symbols
[97] Fix | Delete
'expose-global-constants' => true,
[98] Fix | Delete
'expose-global-classes' => false,
[99] Fix | Delete
'expose-global-functions' => true,
[100] Fix | Delete
'expose-namespaces' => [
[101] Fix | Delete
// 'Acme\Foo' // The Acme\Foo namespace (and sub-namespaces)
[102] Fix | Delete
// '~^PHPUnit\\\\Framework$~', // The whole namespace PHPUnit\Framework (but not sub-namespaces)
[103] Fix | Delete
// '~^$~', // The root namespace only
[104] Fix | Delete
// '', // Any namespace
[105] Fix | Delete
],
[106] Fix | Delete
'expose-classes' => [],
[107] Fix | Delete
'expose-functions' => [],
[108] Fix | Delete
'expose-constants' => [],
[109] Fix | Delete
];
[110] Fix | Delete
[111] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function