@@ -29,7 +29,7 @@ |
||
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 | { |
@@ -107,7 +107,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -133,7 +133,7 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -9,7 +9,6 @@ |
||
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; |