@@ -60,7 +60,7 @@ across different operating systems.
6060
6161Find all PHP files in a directory:
6262
63- ``` php
63+ ``` php
6464use Cake\Utility\Fs\Finder;
6565
6666$finder = (new Finder())
@@ -75,7 +75,7 @@ foreach ($files as $file) {
7575
7676Find directories while excluding certain ones:
7777
78- ``` php
78+ ``` php
7979$directories = (new Finder())
8080 ->in('src')
8181 ->exclude('vendor')
@@ -85,7 +85,7 @@ $directories = (new Finder())
8585
8686By default, the Finder searches recursively. Use ` recursive(false) ` for top-level only:
8787
88- ``` php
88+ ``` php
8989$finder = (new Finder())
9090 ->in('src')
9191 ->recursive(false)
@@ -98,7 +98,7 @@ $finder = (new Finder())
9898
9999Include and exclude specific filename patterns:
100100
101- ``` php
101+ ``` php
102102$finder = (new Finder())
103103 ->in('src')
104104 ->name('*.php') // Include all PHP files
@@ -111,7 +111,7 @@ $finder = (new Finder())
111111
112112Filter by path containing specific strings or regex patterns:
113113
114- ``` php
114+ ``` php
115115$finder = (new Finder())
116116 ->in('src')
117117 ->path('Controller') // Include paths containing "Controller"
@@ -124,7 +124,7 @@ $finder = (new Finder())
124124
125125Control traversal depth using type-safe operators:
126126
127- ``` php
127+ ``` php
128128use Cake\Utility\Fs\Enum\DepthOperator;
129129
130130// Maximum depth of 3
@@ -148,7 +148,7 @@ Available depth operators: `EQUAL`, `NOT_EQUAL`, `LESS_THAN`, `GREATER_THAN`,
148148
149149Use glob patterns with ` ** ` for recursive matching:
150150
151- ``` php
151+ ``` php
152152$finder = (new Finder())
153153 ->in('.')
154154 ->pattern('src/**/*Controller.php')
@@ -163,7 +163,7 @@ Glob syntax: `*` matches any characters except `/`, `**` matches including `/`,
163163
164164For complex filtering, use custom callbacks:
165165
166- ``` php
166+ ``` php
167167use SplFileInfo;
168168
169169$finder = (new Finder())
@@ -175,7 +175,7 @@ $finder = (new Finder())
175175
176176The callback receives ` SplFileInfo ` and the relative path:
177177
178- ``` php
178+ ``` php
179179$finder = (new Finder())
180180 ->in('.')
181181 ->filter(function (SplFileInfo $file, string $relativePath) {
@@ -189,7 +189,7 @@ $finder = (new Finder())
189189
190190Combining multiple filters:
191191
192- ``` php
192+ ``` php
193193use Cake\Utility\Fs\Finder;
194194use Cake\Utility\Fs\Enum\DepthOperator;
195195
@@ -236,7 +236,7 @@ Test if a path matches a glob pattern. Supports `*`, `**`, `?`, and `[abc]` synt
236236
237237### Examples
238238
239- ``` php
239+ ``` php
240240use Cake\Utility\Fs\Path;
241241
242242// Normalize path separators
0 commit comments