Passed
Push — master ( a29a7e...12a432 )
by Mihail
08:06
created
Apps/Controller/Api/Content/ActionGalleryList.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             throw new NativeException('Permission denied');
39 39
         }
40 40
 
41
-        $thumbDir = Normalize::diskFullPath('/upload/gallery/' . $id . '/orig/');
41
+        $thumbDir = Normalize::diskFullPath('/upload/gallery/'.$id.'/orig/');
42 42
         if (!Directory::exist($thumbDir)) {
43 43
             throw new NotFoundException('Nothing found');
44 44
         }
@@ -53,10 +53,10 @@  discard block
 block discarded – undo
53 53
             $fileExt = Str::lastIn($file, '.');
54 54
             $fileName = Str::sub($file, 0, -Str::length($fileExt));
55 55
             $output[] = [
56
-                'thumbnailUrl' => '/upload/gallery/' . $id . '/thumb/' . $fileName . '.jpg',
57
-                'url' => '/upload/gallery/' . $id . '/orig/' . $file,
56
+                'thumbnailUrl' => '/upload/gallery/'.$id.'/thumb/'.$fileName.'.jpg',
57
+                'url' => '/upload/gallery/'.$id.'/orig/'.$file,
58 58
                 'name' => $file,
59
-                'size' => File::size('/upload/gallery/' . $id . '/orig/' . $file)
59
+                'size' => File::size('/upload/gallery/'.$id.'/orig/'.$file)
60 60
             ];
61 61
         }
62 62
 
Please login to merge, or discard this patch.
Apps/Model/Front/Content/EntityContentRead.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
     /**
68 68
      * Prepare model attributes from passed objects
69 69
      * @throws ForbiddenException
70
-    */
70
+     */
71 71
     public function before()
72 72
     {
73 73
         // set class attributes from ActiveRecord objects
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         $this->id = $this->_content->id;
89 89
         $this->title = $this->_content->getLocaled('title');
90 90
         $this->text = $this->_content->getLocaled('text');
91
-        $this->display = (bool)$this->_content->display;
91
+        $this->display = (bool) $this->_content->display;
92 92
 
93 93
         $this->metaTitle = $this->_content->getLocaled('meta_title');
94 94
         $this->metaDescription = $this->_content->getLocaled('meta_description');
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         }
108 108
 
109 109
         $this->source = $this->_content->source;
110
-        $this->views = $this->_content->views+1;
110
+        $this->views = $this->_content->views + 1;
111 111
         $this->rating = $this->_content->rating;
112 112
 
113 113
         // update views count
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 
134 134
         $ignoredRate = App::$Session->get('content.rate.ignore');
135 135
         $this->canRate = true;
136
-        if (Any::isArray($ignoredRate) && Arr::in((string)$this->id, $ignoredRate)) {
136
+        if (Any::isArray($ignoredRate) && Arr::in((string) $this->id, $ignoredRate)) {
137 137
             $this->canRate = false;
138 138
         }
139 139
         if (!App::$User->isAuth()) {
@@ -149,15 +149,15 @@  discard block
 block discarded – undo
149 149
     private function prepareGallery()
150 150
     {
151 151
         // get gallery images and poster data
152
-        $galleryPath = '/upload/gallery/' . $this->_content->id;
152
+        $galleryPath = '/upload/gallery/'.$this->_content->id;
153 153
         // check if gallery folder is exist
154 154
         if (Directory::exist($galleryPath)) {
155
-            $originImages = File::listFiles($galleryPath . '/orig/', ['.jpg', '.png', '.gif', '.jpeg', '.bmp', '.webp'], true);
155
+            $originImages = File::listFiles($galleryPath.'/orig/', ['.jpg', '.png', '.gif', '.jpeg', '.bmp', '.webp'], true);
156 156
             // generate poster data
157 157
             if (Arr::in($this->_content->poster, $originImages)) {
158 158
                 // original poster
159 159
                 $posterName = $this->_content->poster;
160
-                $this->posterFull = $galleryPath . '/orig/' . $posterName;
160
+                $this->posterFull = $galleryPath.'/orig/'.$posterName;
161 161
                 if (!File::exist($this->posterFull)) {
162 162
                     $this->posterFull = null;
163 163
                 }
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
                 $posterSplit = explode('.', $posterName);
167 167
                 array_pop($posterSplit);
168 168
                 $posterCleanName = implode('.', $posterSplit);
169
-                $this->posterThumb = $galleryPath . '/thumb/' . $posterCleanName . '.jpg';
169
+                $this->posterThumb = $galleryPath.'/thumb/'.$posterCleanName.'.jpg';
170 170
                 if (!File::exist($this->posterThumb)) {
171 171
                     $this->posterThumb = null;
172 172
                 }
@@ -182,9 +182,9 @@  discard block
 block discarded – undo
182 182
                     continue;
183 183
                 }
184 184
 
185
-                $thumbPath = $galleryPath . '/thumb/' . $imageClearName . '.jpg';
185
+                $thumbPath = $galleryPath.'/thumb/'.$imageClearName.'.jpg';
186 186
                 if (File::exist($thumbPath)) {
187
-                    $this->galleryItems[$thumbPath] = $galleryPath . '/orig/' . $image;
187
+                    $this->galleryItems[$thumbPath] = $galleryPath.'/orig/'.$image;
188 188
                 }
189 189
             }
190 190
         }
Please login to merge, or discard this patch.
Apps/Controller/Admin/User/ActionIndex.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
         $record = new UserRecord();
29 29
 
30 30
         // set current page num and offset
31
-        $page = (int)$this->request->query->get('page', 0);
31
+        $page = (int) $this->request->query->get('page', 0);
32 32
         $offset = $page * self::ITEM_PER_PAGE;
33 33
 
34 34
         // build pagination object
Please login to merge, or discard this patch.
Apps/View/Front/default/_layouts/default.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
 <main role="main" class="container">
58 58
     <div class="row">
59 59
         <div class="col-md-9">
60
-            <?php if($this->section('body')): ?>
60
+            <?php if ($this->section('body')): ?>
61 61
                 <?= $this->section('body') ?>
62 62
             <?php else: ?>
63 63
                 <p>Page not found!</p>
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,9 +59,12 @@
 block discarded – undo
59 59
         <div class="col-md-9">
60 60
             <?php if($this->section('body')): ?>
61 61
                 <?= $this->section('body') ?>
62
-            <?php else: ?>
62
+            <?php else {
63
+    : ?>
63 64
                 <p>Page not found!</p>
64
-            <?php endif; ?>
65
+            <?php endif;
66
+}
67
+?>
65 68
         </div>
66 69
         <div class="col-md">
67 70
             <div class="card">
Please login to merge, or discard this patch.