@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $this->id = $this->_content->id; |
73 | 73 | $this->title = $this->_content->getLocaled('title'); |
74 | 74 | $this->text = $this->_content->getLocaled('text'); |
75 | - $this->display = (bool)$this->_content->display; |
|
75 | + $this->display = (bool) $this->_content->display; |
|
76 | 76 | |
77 | 77 | // check if title and text are exists |
78 | 78 | if (Str::length($this->title) < 1 || Str::length($this->text) < 1) { |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | } |
103 | 103 | |
104 | 104 | $this->source = $this->_content->source; |
105 | - $this->views = $this->_content->views+1; |
|
105 | + $this->views = $this->_content->views + 1; |
|
106 | 106 | |
107 | 107 | // build category nesting sorted array |
108 | 108 | $this->catNesting[] = $this->expandCategoryNesting(); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $this->rating = $this->_content->rating; |
114 | 114 | $ignoredRate = App::$Session->get('content.rate.ignore'); |
115 | 115 | $this->canRate = true; |
116 | - if (Any::isArray($ignoredRate) && Arr::in((string)$this->id, $ignoredRate)) { |
|
116 | + if (Any::isArray($ignoredRate) && Arr::in((string) $this->id, $ignoredRate)) { |
|
117 | 117 | $this->canRate = false; |
118 | 118 | } |
119 | 119 | if (!App::$User->isAuth()) { |
@@ -133,15 +133,15 @@ discard block |
||
133 | 133 | private function prepareGallery() |
134 | 134 | { |
135 | 135 | // get gallery images and poster data |
136 | - $galleryPath = '/upload/gallery/' . $this->_content->id; |
|
136 | + $galleryPath = '/upload/gallery/'.$this->_content->id; |
|
137 | 137 | // check if gallery folder is exist |
138 | 138 | if (Directory::exist($galleryPath)) { |
139 | - $originImages = File::listFiles($galleryPath . '/orig/', ['.jpg', '.png', '.gif', '.jpeg', '.bmp', '.webp'], true); |
|
139 | + $originImages = File::listFiles($galleryPath.'/orig/', ['.jpg', '.png', '.gif', '.jpeg', '.bmp', '.webp'], true); |
|
140 | 140 | // generate poster data |
141 | 141 | if (Arr::in($this->_content->poster, $originImages)) { |
142 | 142 | // original poster |
143 | 143 | $posterName = $this->_content->poster; |
144 | - $this->posterFull = $galleryPath . '/orig/' . $posterName; |
|
144 | + $this->posterFull = $galleryPath.'/orig/'.$posterName; |
|
145 | 145 | if (!File::exist($this->posterFull)) { |
146 | 146 | $this->posterFull = null; |
147 | 147 | } |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $posterSplit = explode('.', $posterName); |
151 | 151 | array_pop($posterSplit); |
152 | 152 | $posterCleanName = implode('.', $posterSplit); |
153 | - $this->posterThumb = $galleryPath . '/thumb/' . $posterCleanName . '.jpg'; |
|
153 | + $this->posterThumb = $galleryPath.'/thumb/'.$posterCleanName.'.jpg'; |
|
154 | 154 | if (!File::exist($this->posterThumb)) { |
155 | 155 | $this->posterThumb = null; |
156 | 156 | } |
@@ -166,9 +166,9 @@ discard block |
||
166 | 166 | continue; |
167 | 167 | } |
168 | 168 | |
169 | - $thumbPath = $galleryPath . '/thumb/' . $imageClearName . '.jpg'; |
|
169 | + $thumbPath = $galleryPath.'/thumb/'.$imageClearName.'.jpg'; |
|
170 | 170 | if (File::exist($thumbPath)) { |
171 | - $this->galleryItems[$thumbPath] = $galleryPath . '/orig/' . $image; |
|
171 | + $this->galleryItems[$thumbPath] = $galleryPath.'/orig/'.$image; |
|
172 | 172 | } |
173 | 173 | } |
174 | 174 | } |