Skip to content

Commit aff0ef9

Browse files
authored
docs: Fix constant/function assignment in WP example (#1094)
1 parent ab58aa0 commit aff0ef9

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

docs/further-reading.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- [Function aliases](#function-aliases)
77
- [Laravel support](#laravel-support)
88
- [Symfony support](#symfony-support)
9-
- [Wordpress support](#wordpress-support)
9+
- [WordPress support](#wordpress-support)
1010

1111

1212
### How to deal with unknown third-party symbols
@@ -156,9 +156,9 @@ return [
156156
Note that the path is the "regular path(s)" that can be passed to patchers.
157157

158158

159-
### Wordpress Support
159+
### WordPress Support
160160

161-
When writing a Wordpress plugin, you need to [exclude Wordpress' symbols](#excluded-symbols). To facilitate
161+
When writing a WordPress plugin, you need to [exclude WordPress' symbols](#excluded-symbols). To facilitate
162162
this task, [Snicco] created a third-party CLI tool [php-scoper-excludes] that can be used to generate
163163
PHP-Scoper compatible symbol lists for any PHP codebase you point it.
164164

@@ -181,14 +181,15 @@ function getWpExcludedSymbols(string $fileName): array
181181
);
182182
}
183183

184-
$wp_classes = getWpExcludedSymbols('exclude-wordpress-classes.json');
185-
$wp_functions = getWpExcludedSymbols('exclude-wordpress-functions.json');
186-
$wp_constants = getWpExcludedSymbols('exclude-wordpress-constants.json');
184+
$wpConstants = getWpExcludedSymbols('exclude-wordpress-constants.json');
185+
$wpClasses = getWpExcludedSymbols('exclude-wordpress-classes.json');
186+
$wpFunctions = getWpExcludedSymbols('exclude-wordpress-functions.json');
187+
187188

188189
return [
189-
'exclude-classes' => $wp_classes,
190-
'exclude-constants' => $wp_functions,
191-
'exclude-functions' => $wp_constants,
190+
'exclude-constants' => $wpConstants,
191+
'exclude-classes' => $wpClasses,
192+
'exclude-functions' => $wpFunctions,
192193
// ...
193194
];
194195
```

0 commit comments

Comments
 (0)