@@ -197,11 +197,12 @@ Restrict files by name with the
197
197
198
198
$finder->files()->name('*.php');
199
199
200
- The ``name() `` method accepts globs, strings, regexes or an array of globs, strings or regexes::
200
+ The ``name() `` method accepts globs, strings, regexes or an array of globs,
201
+ strings or regexes::
201
202
202
203
$finder->files()->name('/\.php$/');
203
204
204
- Multiple files names can be defined by chaining calls or using an array as parameter ::
205
+ Multiple files names can be defined by chaining calls or passing an array::
205
206
206
207
$finder->files()->name('*.php')->name('*.twig');
207
208
@@ -212,15 +213,16 @@ The ``notName()`` method excludes files matching a pattern::
212
213
213
214
$finder->files()->notName('*.rb');
214
215
215
- Multiple files names can be excluded by chaining calls or using an array as parameter ::
216
+ Multiple files names can be excluded by chaining calls or passing an array::
216
217
217
218
$finder->files()->notName('*.rb')->notName('*.py');
218
219
219
220
// same as above
220
221
$finder->files()->notName(array('*.rb', '*.py'));
221
222
222
223
.. versionadded :: 4.2
223
- Passing an array as parameter for method ``name() `` and ``notName() `` was introduced in Symfony 4.2
224
+ Passing an array as parameter for method ``name() `` and ``notName() `` was
225
+ introduced in Symfony 4.2
224
226
225
227
File Contents
226
228
~~~~~~~~~~~~~
@@ -251,20 +253,22 @@ Restrict files and directories by path with the
251
253
252
254
On all platforms slash (i.e. ``/ ``) should be used as the directory separator.
253
255
254
- The ``path() `` method accepts a string, a regular expression or an array of strings or regulars expressions::
256
+ The ``path() `` method accepts a string, a regular expression or an array of
257
+ strings or regulars expressions::
255
258
256
259
$finder->path('foo/bar');
257
260
$finder->path('/^foo\/bar/');
258
261
259
- Multiple paths can be defined by chaining calls or using an array as parameter ::
262
+ Multiple paths can be defined by chaining calls or passing an array::
260
263
261
264
$finder->path('data')->path('foo/bar');
262
265
263
266
// same as above
264
267
$finder->path(array('data', 'foo/bar'));
265
268
266
269
.. versionadded :: 4.2
267
- Passing an array as parameter for method ``path() `` and ``notPath() `` was introduced in Symfony 4.2
270
+ Passing an array as parameter for method ``path() `` and ``notPath() `` was
271
+ introduced in Symfony 4.2
268
272
269
273
Internally, strings are converted into regular expressions by escaping slashes
270
274
and adding delimiters:
@@ -278,7 +282,7 @@ The :method:`Symfony\\Component\\Finder\\Finder::notPath` method excludes files
278
282
279
283
$finder->notPath('other/dir');
280
284
281
- Multiple paths can be excluded by chaining calls or using an array as parameter ::
285
+ Multiple paths can be excluded by chaining calls or passing an array::
282
286
283
287
$finder->notPath('first/dir')->notPath('other/dir');
284
288
@@ -296,7 +300,7 @@ Restrict files by size with the
296
300
297
301
$finder->files()->size('< 1.5K');
298
302
299
- Restrict by a size range by chaining calls or using an array as argument ::
303
+ Restrict by a size range by chaining calls or passing an array::
300
304
301
305
$finder->files()->size('>= 1K')->size('<= 2K');
302
306
@@ -321,7 +325,7 @@ Restrict files by last modified dates with the
321
325
322
326
$finder->date('since yesterday');
323
327
324
- Restrict by a date range by chaining calls or using an array as argument ::
328
+ Restrict by a date range by chaining calls or passing an array::
325
329
326
330
$finder->date('>= 2018-01-01')->size('<= 2018-12-31');
327
331
@@ -346,7 +350,7 @@ traversing with :method:`Symfony\\Component\\Finder\\Finder::depth`::
346
350
$finder->depth('== 0');
347
351
$finder->depth('< 3');
348
352
349
- Restrict by a depth range by chaining calls or using an array as argument ::
353
+ Restrict by a depth range by chaining calls or passing an array::
350
354
351
355
$finder->depth('> 2')->depth('< 5');
352
356
0 commit comments