From 3ba12c5f69a039b83bbbcf9941dcdd3567bf19fd Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Tue, 23 Jan 2018 14:15:23 +0100 Subject: [PATCH] Update phpdoc (add missing throws) Remove is_dir check --- protected/humhub/components/export/ExportResult.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/protected/humhub/components/export/ExportResult.php b/protected/humhub/components/export/ExportResult.php index 51d6a252c6..c4ac7b1f02 100644 --- a/protected/humhub/components/export/ExportResult.php +++ b/protected/humhub/components/export/ExportResult.php @@ -12,8 +12,8 @@ use PhpOffice\PhpSpreadsheet\IOFactory; use PhpOffice\PhpSpreadsheet\Spreadsheet; use Yii; use yii\base\Object; +use yii\helpers\FileHelper; use yii\web\Response; -use humhub\modules\file\libs\FileHelper; /** * ExportResult represents SpreadsheetExport result. @@ -67,14 +67,13 @@ class ExportResult extends Object /** * @return string files directory name + * @throws \yii\base\Exception */ public function getTempFileName() { if ($this->tempFileName === null) { $basePath = Yii::getAlias($this->basePath); - if (!is_dir($basePath)) { - FileHelper::createDirectory($basePath); - } + FileHelper::createDirectory($basePath); $this->tempFileName = $basePath . DIRECTORY_SEPARATOR . uniqid(time(), true); } return $this->tempFileName; @@ -132,6 +131,7 @@ class ExportResult extends Object * @return \yii\web\Response application response instance. * @throws \PhpOffice\PhpSpreadsheet\Exception * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception + * @throws \yii\base\Exception */ public function send($options = []) {