@@ -25,7 +25,8 @@ Complete configuration reference (details about each entry is available):
2525
2626// scoper.inc.php
2727
28- use Isolated\Symfony\Component\Finder\Finder;
28+ /** @var Symfony\Component\Finder\Finder $finder */
29+ $finder = Isolated\Symfony\Component\Finder\Finder::class;
2930
3031return [
3132 'prefix' => null, // string|null
@@ -39,11 +40,11 @@ return [
3940 'exclude-constants' => [], // list<string |regex >
4041 'exclude-classes' => [], // list<string |regex >
4142 'exclude-functions' => [], // list<string |regex >
42-
43+
4344 'expose-global-constants' => true, // bool
4445 'expose-global-classes' => true, // bool
4546 'expose-global-functions' => true, // bool
46-
47+
4748 'expose-namespaces' => [], // list<string |regex >
4849 'expose-constants' => [], // list<string |regex >
4950 'expose-classes' => [], // list<string |regex >
@@ -60,7 +61,7 @@ then a random prefix will be automatically generated.
6061
6162### PHP Version
6263
63- The PHP version provided is used to configure the underlying [ PHP-Parser] Parser and Printer.
64+ The PHP version provided is used to configure the underlying [ PHP-Parser] Parser and Printer.
6465
6566The version used by the Parser will affect what code it can understand, e.g. if it is configured in PHP 8.2 it will not
6667understand a PHP 8.3 construct (e.g. typed class constants). However, what symbols are interpreted as internal will
@@ -95,12 +96,13 @@ files should be scoped by using [Finders][symfony_finder] in the configuration:
9596
9697// scoper.inc.php
9798
98- use Isolated\Symfony\Component\Finder\Finder;
99+ /** @var Symfony\Component\Finder\Finder $finder */
100+ $finder = Isolated\Symfony\Component\Finder\Finder::class;
99101
100102return [
101103 'finders' => [
102- Finder ::create()->files()->in('src'),
103- Finder ::create()
104+ $finder ::create()->files()->in('src'),
105+ $finder ::create()
104106 ->files()
105107 ->ignoreVCS(true)
106108 ->notName('/LICENSE|.*\\.md|.*\\.dist|Makefile|composer\\.json|composer\\.lock/')
@@ -113,7 +115,7 @@ return [
113115 'vendor-bin',
114116 ])
115117 ->in('vendor'),
116- Finder ::create()->append([
118+ $finder ::create()->append([
117119 'bin/php-scoper',
118120 'composer.json',
119121 ])
@@ -129,7 +131,7 @@ php-scoper add-prefix file1.php bin/file2.php
129131
130132Paths added manually are appended to the paths found by the finders.
131133
132- If you are using [ Box] [ box ] , all the (non-binary) files included are used
134+ If you are using [ Box] [ box ] , all the (non-binary) files included are used
133135instead of the ` finders ` setting.
134136
135137
@@ -232,7 +234,7 @@ return [
232234```
233235
234236This enriches the list of Symbols PHP-Scoper's Reflector considers as "internal",
235- i.e. PHP engine or extension symbols. Such symbols will be left completely
237+ i.e. PHP engine or extension symbols. Such symbols will be left completely
236238untouched.*
237239
238240* : There is _ one_ exception, which is declarations of functions. If you have the function
@@ -337,7 +339,7 @@ Notes:
337339- An excluded symbol will not be exposed. If for example you expose the class
338340 ` Acme\Foo ` but the ` Acme ` namespace is excluded, then ` Acme\Foo ` will NOT
339341 be exposed.
340- - Exposing a namespace also exposes its sub-namespaces (with the aforementioned
342+ - Exposing a namespace also exposes its sub-namespaces (with the aforementioned
341343 note applying)
342344- Exposing symbols will most likely require PHP-Scoper to adjust the Composer
343345 autoloader. To do so with minimal conflicts, PHP-Scoper dumps everything
@@ -358,7 +360,7 @@ The namespace configuration is identical to [excluding namespaces](#excluding-na
358360
359361How the symbols are exposed is done as described in the next sections. Note
360362however that some symbols cannot be exposed (see [ exposing/excluding traits] ( limitations.md#exposingexcluding-traits )
361- and [ exposing/excluding enums] ( limitations.md#exposingexcluding-enums ) )
363+ and [ exposing/excluding enums] ( limitations.md#exposingexcluding-enums ) )
362364
363365
364366### Exposing classes
0 commit comments