src/helpers/helpers.php
/**
 * Shortcut function for getting contents of directory
 * @param string $dir
 * @return array
 */
Shortcut function for getting contents of directory
@param string $dir
@return array
Shortcut function for getting contents of directory @param string $dir @return array
function scan_dir(string $dir) : array
{
    $filePaths = array_diff(scandir($dir), ['..', '.']);
    return array_map(function($filePath) use ($dir){ return realpath($dir.DIRECTORY_SEPARATOR.$filePath); }, $filePaths);
}
function scan_dir ( string $ dir ) : array { $ filePaths = array_diff ( scandir ( $ dir ) , [ '..' , '.' ] ) ; return array_map ( function ( $ filePath ) use ( $ dir ) { return realpath ( $ dir . DIRECTORY_SEPARATOR . $ filePath ) ; } , $ filePaths ) ; }
Shortcut function for getting contents of directory
 @param string $dir
 @return array
Shortcut function for getting contents of directory @param string $dir @return array