src/Message/Server/Request.php
private function checkUploadedFiles(array $files)
    {
        $valid = true;

        foreach ($files as $file) {
            if (is_array($file)) {
                $valid = $this->checkUploadedFiles($files);
                break;
            }

            if (! $file instanceof UploadedFile) {
                $valid = false;
                break;
            }
        }

        return $valid;
    }
private function checkUploadedFiles(array $files)
    {
        $valid = true;

        foreach ($files as $file) {
            if (is_array($file)) {
                $valid = $this->checkUploadedFiles($files);
                break;
            }

            if (! $file instanceof UploadedFile) {
                $valid = false;
                break;
            }
        }

        return $valid;
    }
Check if provided files array is valid

@param array $files

@return bool