@@ -192,7 +192,7 @@ public function getAdapters()
192192 /**
193193 * Restricts the matching to directories only.
194194 *
195- * @return Finder The current Finder instance
195+ * @return Finder|SplFileInfo[] The current Finder instance
196196 */
197197 public function directories ()
198198 {
@@ -204,7 +204,7 @@ public function directories()
204204 /**
205205 * Restricts the matching to files only.
206206 *
207- * @return Finder The current Finder instance
207+ * @return Finder|SplFileInfo[] The current Finder instance
208208 */
209209 public function files ()
210210 {
@@ -223,7 +223,7 @@ public function files()
223223 *
224224 * @param int $level The depth level expression
225225 *
226- * @return Finder The current Finder instance
226+ * @return Finder|SplFileInfo[] The current Finder instance
227227 *
228228 * @see DepthRangeFilterIterator
229229 * @see NumberComparator
@@ -247,7 +247,7 @@ public function depth($level)
247247 *
248248 * @param string $date A date range string
249249 *
250- * @return Finder The current Finder instance
250+ * @return Finder|SplFileInfo[] The current Finder instance
251251 *
252252 * @see strtotime
253253 * @see DateRangeFilterIterator
@@ -271,7 +271,7 @@ public function date($date)
271271 *
272272 * @param string $pattern A pattern (a regexp, a glob, or a string)
273273 *
274- * @return Finder The current Finder instance
274+ * @return Finder|SplFileInfo[] The current Finder instance
275275 *
276276 * @see FilenameFilterIterator
277277 */
@@ -287,7 +287,7 @@ public function name($pattern)
287287 *
288288 * @param string $pattern A pattern (a regexp, a glob, or a string)
289289 *
290- * @return Finder The current Finder instance
290+ * @return Finder|SplFileInfo[] The current Finder instance
291291 *
292292 * @see FilenameFilterIterator
293293 */
@@ -308,7 +308,7 @@ public function notName($pattern)
308308 *
309309 * @param string $pattern A pattern (string or regexp)
310310 *
311- * @return Finder The current Finder instance
311+ * @return Finder|SplFileInfo[] The current Finder instance
312312 *
313313 * @see FilecontentFilterIterator
314314 */
@@ -329,7 +329,7 @@ public function contains($pattern)
329329 *
330330 * @param string $pattern A pattern (string or regexp)
331331 *
332- * @return Finder The current Finder instance
332+ * @return Finder|SplFileInfo[] The current Finder instance
333333 *
334334 * @see FilecontentFilterIterator
335335 */
@@ -352,7 +352,7 @@ public function notContains($pattern)
352352 *
353353 * @param string $pattern A pattern (a regexp or a string)
354354 *
355- * @return Finder The current Finder instance
355+ * @return Finder|SplFileInfo[] The current Finder instance
356356 *
357357 * @see FilenameFilterIterator
358358 */
@@ -375,7 +375,7 @@ public function path($pattern)
375375 *
376376 * @param string $pattern A pattern (a regexp or a string)
377377 *
378- * @return Finder The current Finder instance
378+ * @return Finder|SplFileInfo[] The current Finder instance
379379 *
380380 * @see FilenameFilterIterator
381381 */
@@ -395,7 +395,7 @@ public function notPath($pattern)
395395 *
396396 * @param string $size A size range string
397397 *
398- * @return Finder The current Finder instance
398+ * @return Finder|SplFileInfo[] The current Finder instance
399399 *
400400 * @see SizeRangeFilterIterator
401401 * @see NumberComparator
@@ -412,7 +412,7 @@ public function size($size)
412412 *
413413 * @param string|array $dirs A directory path or an array of directories
414414 *
415- * @return Finder The current Finder instance
415+ * @return Finder|SplFileInfo[] The current Finder instance
416416 *
417417 * @see ExcludeDirectoryFilterIterator
418418 */
@@ -428,7 +428,7 @@ public function exclude($dirs)
428428 *
429429 * @param bool $ignoreDotFiles Whether to exclude "hidden" files or not
430430 *
431- * @return Finder The current Finder instance
431+ * @return Finder|SplFileInfo[] The current Finder instance
432432 *
433433 * @see ExcludeDirectoryFilterIterator
434434 */
@@ -448,7 +448,7 @@ public function ignoreDotFiles($ignoreDotFiles)
448448 *
449449 * @param bool $ignoreVCS Whether to exclude VCS files or not
450450 *
451- * @return Finder The current Finder instance
451+ * @return Finder|SplFileInfo[] The current Finder instance
452452 *
453453 * @see ExcludeDirectoryFilterIterator
454454 */
@@ -488,7 +488,7 @@ public static function addVCSPattern($pattern)
488488 *
489489 * @param \Closure $closure An anonymous function
490490 *
491- * @return Finder The current Finder instance
491+ * @return Finder|SplFileInfo[] The current Finder instance
492492 *
493493 * @see SortableIterator
494494 */
@@ -504,7 +504,7 @@ public function sort(\Closure $closure)
504504 *
505505 * This can be slow as all the matching files and directories must be retrieved for comparison.
506506 *
507- * @return Finder The current Finder instance
507+ * @return Finder|SplFileInfo[] The current Finder instance
508508 *
509509 * @see SortableIterator
510510 */
@@ -520,7 +520,7 @@ public function sortByName()
520520 *
521521 * This can be slow as all the matching files and directories must be retrieved for comparison.
522522 *
523- * @return Finder The current Finder instance
523+ * @return Finder|SplFileInfo[] The current Finder instance
524524 *
525525 * @see SortableIterator
526526 */
@@ -538,7 +538,7 @@ public function sortByType()
538538 *
539539 * This can be slow as all the matching files and directories must be retrieved for comparison.
540540 *
541- * @return Finder The current Finder instance
541+ * @return Finder|SplFileInfo[] The current Finder instance
542542 *
543543 * @see SortableIterator
544544 */
@@ -558,7 +558,7 @@ public function sortByAccessedTime()
558558 *
559559 * This can be slow as all the matching files and directories must be retrieved for comparison.
560560 *
561- * @return Finder The current Finder instance
561+ * @return Finder|SplFileInfo[] The current Finder instance
562562 *
563563 * @see SortableIterator
564564 */
@@ -576,7 +576,7 @@ public function sortByChangedTime()
576576 *
577577 * This can be slow as all the matching files and directories must be retrieved for comparison.
578578 *
579- * @return Finder The current Finder instance
579+ * @return Finder|SplFileInfo[] The current Finder instance
580580 *
581581 * @see SortableIterator
582582 */
@@ -595,7 +595,7 @@ public function sortByModifiedTime()
595595 *
596596 * @param \Closure $closure An anonymous function
597597 *
598- * @return Finder The current Finder instance
598+ * @return Finder|SplFileInfo[] The current Finder instance
599599 *
600600 * @see CustomFilterIterator
601601 */
@@ -609,7 +609,7 @@ public function filter(\Closure $closure)
609609 /**
610610 * Forces the following of symlinks.
611611 *
612- * @return Finder The current Finder instance
612+ * @return Finder|SplFileInfo[] The current Finder instance
613613 */
614614 public function followLinks ()
615615 {
@@ -625,7 +625,7 @@ public function followLinks()
625625 *
626626 * @param bool $ignore
627627 *
628- * @return Finder The current Finder instance
628+ * @return Finder|SplFileInfo[] The current Finder instance
629629 */
630630 public function ignoreUnreadableDirs ($ ignore = true )
631631 {
@@ -639,7 +639,7 @@ public function ignoreUnreadableDirs($ignore = true)
639639 *
640640 * @param string|array $dirs A directory path or an array of directories
641641 *
642- * @return Finder The current Finder instance
642+ * @return Finder|SplFileInfo[] The current Finder instance
643643 *
644644 * @throws \InvalidArgumentException if one of the directories does not exist
645645 */
@@ -700,7 +700,7 @@ public function getIterator()
700700 *
701701 * @param mixed $iterator
702702 *
703- * @return Finder The finder
703+ * @return Finder|SplFileInfo[] The finder
704704 *
705705 * @throws \InvalidArgumentException When the given argument is not iterable.
706706 */
0 commit comments