src/Nerd/Framework/Http/Request/Request.php
private static function encapsulateFiles($files)
    {
        $validFiles = array_filter($files, function ($file) {
            return $file['error'] == UPLOAD_ERR_OK;
        });

        return array_map(function ($file) {
            return new File($file['name'], $file['size'], $file['tmp_name']);
        }, $validFiles);
    }
private static function encapsulateFiles($files)
    {
        $validFiles = array_filter($files, function ($file) {
            return $file['error'] == UPLOAD_ERR_OK;
        });

        return array_map(function ($file) {
            return new File($file['name'], $file['size'], $file['tmp_name']);
        }, $validFiles);
    }
private static function encapsulateFiles ( $ files ) { $ validFiles = array_filter ( $ files , function ( $ file ) { return $ file [ 'error' ] == UPLOAD_ERR_OK ; } ) ; return array_map ( function ( $ file ) { return new File ( $ file [ 'name' ] , $ file [ 'size' ] , $ file [ 'tmp_name' ] ) ; } , $ validFiles ) ; }
Encapsulate files into File objects.

@param array $files
@return File[]
Encapsulate files into File objects .