Completed
Pull Request — master (#8)
by Anton
02:06
created
application/modules/media/controllers/grid.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
  *
21 21
  * @return array
22 22
  */
23
-return function () {
23
+return function() {
24 24
     /**
25 25
      * @var Controller $this
26 26
      */
Please login to merge, or discard this patch.
application/modules/media/controllers/crud.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
  * @throws \Bluz\Application\Exception\ForbiddenException
30 30
  * @throws \Bluz\Application\Exception\NotImplementedException
31 31
  */
32
-return function () {
32
+return function() {
33 33
     /**
34 34
      * @var Controller $this
35 35
      */
Please login to merge, or discard this 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/list.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
  * @return array
20 20
  * @throws Exception
21 21
  */
22
-return function () {
22
+return function() {
23 23
     /**
24 24
      * @var Controller $this
25 25
      */
Please login to merge, or discard this patch.
application/modules/media/controllers/progress.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
  * @return string
19 19
  * @throws Exception
20 20
  */
21
-return function ($file) {
21
+return function($file) {
22 22
     /**
23 23
      * @var Controller $this
24 24
      */
Please login to merge, or discard this patch.
application/models/Media/Grid.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 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
 
Please login to merge, or discard this patch.
application/models/Media/Table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 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
 
Please login to merge, or discard this patch.
application/models/Media/Crud.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 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
 
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.