Skip to content

Commit

Permalink
[TASK] Fix return type annotation of get_dirs method
Browse files Browse the repository at this point in the history
As three different return types can be returned, they should all be
documented. This allows for better autocompletion and type safety through
static code analysis.

Resolves: #89407
Releases: master, 9.5, 8.7
Change-Id: I181bc9b79eeaa4add0d2d06cfd6b8b2fda330442
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61984
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Frank Nägler <frank.naegler@typo3.org>
Reviewed-by: Frank Nägler <frank.naegler@typo3.org>
  • Loading branch information
DanielSiepmann authored and NeoBlack committed Oct 18, 2019
1 parent aa20c0f commit 7ef6301
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion typo3/sysext/core/Classes/Utility/GeneralUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -2267,9 +2267,10 @@ public static function flushDirectory($directory, $keepOriginalDirectory = false
/**
* Returns an array with the names of folders in a specific path
* Will return 'error' (string) if there were an error with reading directory content.
* Will return null if provided path is false.
*
* @param string $path Path to list directories from
* @return array Returns an array with the directory entries as values. If no path, the return value is nothing.
* @return array|string|null Returns an array with the directory entries as values. If no path is provided, the return value will be null.
*/
public static function get_dirs($path)
{
Expand Down

0 comments on commit 7ef6301

Please sign in to comment.