Completed
Push — master ( 400589...beb115 )
by Anton
02:32
created
application/models/Media/Crud.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -67,19 +67,19 @@
 block discarded – undo
67 67
         $originFileName = $fileName;
68 68
         $counter = 0;
69 69
 
70
-        while (file_exists($this->uploadDir .'/'. $fileName .'.'. $pathinfo['extension'])) {
70
+        while (file_exists($this->uploadDir.'/'.$fileName.'.'.$pathinfo['extension'])) {
71 71
             $counter++;
72
-            $fileName = $originFileName .'-'. $counter;
72
+            $fileName = $originFileName.'-'.$counter;
73 73
         }
74 74
 
75
-        $filePath = $this->uploadDir .'/'. $fileName .'.'. $pathinfo['extension'];
75
+        $filePath = $this->uploadDir.'/'.$fileName.'.'.$pathinfo['extension'];
76 76
 
77 77
         // Setup new name and move to user directory
78 78
         $file->moveTo($filePath);
79 79
 
80 80
         $publicDir = substr($this->uploadDir, strlen(PATH_PUBLIC) + 1);
81 81
 
82
-        $data['file'] = $publicDir .'/'. $fileName .'.'. $pathinfo['extension'];
82
+        $data['file'] = $publicDir.'/'.$fileName.'.'.$pathinfo['extension'];
83 83
         $data['type'] = $file->getClientMediaType();
84 84
 
85 85
         $row = $this->getTable()->create();
Please login to merge, or discard this patch.
application/models/Media/Row.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     public function createThumbnail()
59 59
     {
60 60
         // set full path
61
-        $image = new Thumbnail(PATH_PUBLIC .'/'. $this->file);
61
+        $image = new Thumbnail(PATH_PUBLIC.'/'.$this->file);
62 62
         $image->setHeight(self::THUMB_HEIGHT);
63 63
         $image->setWidth(self::THUMB_WIDTH);
64 64
         $thumb = $image->generate();
@@ -76,11 +76,11 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function deleteFiles()
78 78
     {
79
-        if ($this->file && is_file(PATH_PUBLIC .'/'. $this->file)) {
80
-            @unlink(PATH_PUBLIC .'/'. $this->file);
79
+        if ($this->file && is_file(PATH_PUBLIC.'/'.$this->file)) {
80
+            @unlink(PATH_PUBLIC.'/'.$this->file);
81 81
         }
82
-        if ($this->thumb && is_file(PATH_PUBLIC .'/'. $this->thumb)) {
83
-            @unlink(PATH_PUBLIC .'/'. $this->thumb);
82
+        if ($this->thumb && is_file(PATH_PUBLIC.'/'.$this->thumb)) {
83
+            @unlink(PATH_PUBLIC.'/'.$this->thumb);
84 84
         }
85 85
     }
86 86
 
Please login to merge, or discard this patch.
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 1 patch
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.
application/modules/media/controllers/upload.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
  * @throws ConfigException
26 26
  * @throws Exception
27 27
  */
28
-return function () {
28
+return function() {
29 29
     /**
30 30
      * @var Controller $this
31 31
      * @var UploadedFile $file
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         $original = pathinfo($file->getClientFilename(), PATHINFO_FILENAME);
41 41
 
42 42
         // rename file to date/time stamp
43
-        $filename = date('Ymd_Hi') .'.'. pathinfo($file->getClientFilename(), PATHINFO_EXTENSION);
43
+        $filename = date('Ymd_Hi').'.'.pathinfo($file->getClientFilename(), PATHINFO_EXTENSION);
44 44
 
45 45
         // switch to JSON response
46 46
         $this->useJson();
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   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 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
      */
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         session_start();
29 29
     }
30 30
 
31
-    $key = ini_get("session.upload_progress.prefix") . $file;
31
+    $key = ini_get("session.upload_progress.prefix").$file;
32 32
 
33 33
     if (!isset($_SESSION[$key])) {
34 34
         throw new Exception("Invalid file identity");
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
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 /**
17 17
  * @return void
18 18
  */
19
-return function () {
19
+return function() {
20 20
     /**
21 21
      * @var Controller $this
22 22
      */
Please login to merge, or discard this patch.