Passed
Push — master ( 489d5a...3a2bb3 )
by Vitaly
31:18 queued 04:27
created
src/Application.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     /**
30 30
      * Initialize module
31 31
      * @param array $params Collection of parameters
32
-     * @return bool True if success
32
+     * @return boolean|null True if success
33 33
      */
34 34
     public function init(array $params = array())
35 35
     {
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
                     foreach (array_keys($scale->thumnails_sizes) as $folder) {
109 109
                         // Form image path for scale module
110
-                        $imageScalePath = $this->formImagePath($image->Path . $folder . '/', $image->Src);
110
+                        $imageScalePath = $this->formImagePath($image->Path.$folder.'/', $image->Src);
111 111
                         if ($this->imageExists($imageScalePath)) {
112 112
                             $this->fs->delete($imageScalePath);
113 113
                         }
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
                 }
237 237
             }
238 238
         } else {
239
-            $errorText = "Файл ( " . urldecode($_SERVER['HTTP_X_FILE_NAME']) . " ) не является картинкой!";
239
+            $errorText = "Файл ( ".urldecode($_SERVER['HTTP_X_FILE_NAME'])." ) не является картинкой!";
240 240
             $result = array('status' => false, 'errorText' => $errorText);
241 241
         }
242 242
 
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
                 }
400 400
 
401 401
                 // set image size string representation, if it is not 0
402
-                $size = ($image->size == 0) ? '' : $size . $this->humanFileSize($image->size);
402
+                $size = ($image->size == 0) ? '' : $size.$this->humanFileSize($image->size);
403 403
 
404 404
                 // Render gallery image tumb
405 405
                 $items_html .= $this->view('tumbs/item')
@@ -430,9 +430,9 @@  discard block
 block discarded – undo
430 430
     {
431 431
         /** @var string $sizeLetters Size shortcuts */
432 432
         $sizeLetters = 'BKBMBGBTBPB';
433
-        $factor = (int)(floor((strlen($bytes) - 1) / 3));
433
+        $factor = (int) (floor((strlen($bytes) - 1) / 3));
434 434
         $sizeLetter = ($factor <= 0) ? substr($sizeLetters, 0, 1) : substr($sizeLetters, $factor * 2 - 1, 2);
435
-        return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . $sizeLetter;
435
+        return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)).$sizeLetter;
436 436
     }
437 437
 
438 438
     /**
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
         if (empty($imagePath)) {
469 469
             $path = $imageSrc;
470 470
         } else { // Use new CORRECT way
471
-            $path = $imagePath . $imageSrc;
471
+            $path = $imagePath.$imageSrc;
472 472
         }
473 473
 
474 474
         // form relative path to the image
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
             if ($dir == '/') {
479 479
                 return substr($path, 1);
480 480
             } else {
481
-                return preg_replace('/' . addcslashes($dir, '/') . '/', '', $path);
481
+                return preg_replace('/'.addcslashes($dir, '/').'/', '', $path);
482 482
             }
483 483
         }
484 484
 
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         return array('status' => true, 'html' => $this->getHTML($materialFieldId));
134 134
     }
135 135
 
136
-	/**
136
+    /**
137 137
      * Controller for getting quantity image in gallery.
138 138
      *
139 139
      * @param integer $materialFieldId identefier Table MaterialField
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
         return $response;
153 153
     }
154 154
 	
155
-	/**
155
+    /**
156 156
      *  Controller for update material image properties alt from gallery.
157 157
      *
158 158
      *  @param int $imageId Gallery image identifier
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
 
397 397
                 // if file doesn't exist
398 398
                 if (!$this->imageExists($path)) {
399
-                      $path = ResourceMap::find('www/img/no-img.png', $this);
399
+                        $path = ResourceMap::find('www/img/no-img.png', $this);
400 400
                 }
401 401
 
402 402
                 // set image size string representation, if it is not 0
Please login to merge, or discard this patch.
src/tab/Gallery.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,6 @@
 block discarded – undo
9 9
 namespace samsoncms\app\gallery\tab;
10 10
 
11 11
 use samson\activerecord\field;
12
-use samson\cms\Navigation;
13 12
 use samsoncms\form\tab\Generic;
14 13
 use samsonframework\core\RenderInterface;
15 14
 use samsonframework\orm\QueryInterface;
Please login to merge, or discard this patch.