Completed
Pull Request — master (#8)
by Anton
02:06
created
application/modules/media/controllers/crud.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,6 @@
 block discarded – undo
13 13
 use Application\Media;
14 14
 use Bluz\Controller\Controller;
15 15
 use Bluz\Controller\Mapper\Crud;
16
-use Bluz\Proxy\Config;
17 16
 use Bluz\Proxy\Layout;
18 17
 use Bluz\Proxy\Request;
19 18
 use Bluz\Proxy\Response;
Please login to merge, or discard this patch.
application/modules/media/controllers/upload.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@
 block discarded – undo
11 11
  */
12 12
 namespace Application;
13 13
 
14
-use Application\Media\Manager;
15 14
 use Bluz\Application\Exception\BadRequestException;
16 15
 use Bluz\Config\ConfigException;
17 16
 use Bluz\Controller\Controller;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
  * @throws BadRequestException
27 27
  * @throws ConfigException
28 28
  */
29
-return function () {
29
+return function() {
30 30
     /**
31 31
      * @var Controller $this
32 32
      * @var UploadedFile $file
Please login to merge, or discard this patch.
application/models/Media/Manager.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
  * @link https://github.com/bluzphp/skeleton
5 5
  */
6 6
 
7
-declare(strict_types=1);
7
+declare(strict_types = 1);
8 8
 
9 9
 namespace Application\Media;
10 10
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
             throw new ConfigException('Upload path is not configured');
88 88
         }
89 89
 
90
-        $fullPath = PATH_PUBLIC .'/'. $uploadPath .'/'. $directory;
90
+        $fullPath = PATH_PUBLIC.'/'.$uploadPath.'/'.$directory;
91 91
 
92 92
         if (!is_dir($fullPath) && !@mkdir($fullPath, 0755, true)) {
93 93
             throw new ConfigException('Upload folder is not exists, please create it');
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
 
100 100
         $fileName = $this->getFileName($fullPath);
101 101
 
102
-        $this->publicPath = $uploadPath .'/'. $directory .'/'. $fileName;
103
-        $this->uploadPath = $fullPath .'/'. $fileName;
102
+        $this->publicPath = $uploadPath.'/'.$directory.'/'.$fileName;
103
+        $this->uploadPath = $fullPath.'/'.$fileName;
104 104
 
105 105
         $this->file->moveTo($this->uploadPath);
106 106
     }
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         // If file already exists, increment name
195 195
         $originFileName = $fileName;
196 196
         $counter = 0;
197
-        while (file_exists($path .'/'.$fileName.'.'.$fileExt)) {
197
+        while (file_exists($path.'/'.$fileName.'.'.$fileExt)) {
198 198
             $counter++;
199 199
             $fileName = $originFileName.'-'.$counter;
200 200
         }
Please login to merge, or discard this patch.
application/models/Media/Row.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
  * @link https://github.com/bluzphp/skeleton
5 5
  */
6 6
 
7
-declare(strict_types=1);
7
+declare(strict_types = 1);
8 8
 
9 9
 namespace Application\Media;
10 10
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $fileManager = new Manager($this, $file);
99 99
 
100 100
         // move request file
101
-        $fileManager->moveToDir($this->userId .'/'. $this->module);
101
+        $fileManager->moveToDir($this->userId.'/'.$this->module);
102 102
 
103 103
         // fill row data
104 104
         $this->title = $this->title ?: pathinfo($file->getClientFilename(), PATHINFO_FILENAME);
Please login to merge, or discard this patch.
application/modules/media/controllers/manager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 /**
18 18
  * @return array
19 19
  */
20
-return function () {
20
+return function() {
21 21
     /**
22 22
      * @var Controller $this
23 23
      */
Please login to merge, or discard this patch.