@@ -201,7 +201,7 @@ |
||
| 201 | 201 | /** |
| 202 | 202 | * Returns whether the current mode is Frontend |
| 203 | 203 | * |
| 204 | - * @return string |
|
| 204 | + * @return boolean |
|
| 205 | 205 | */ |
| 206 | 206 | protected function isFrontendMode() |
| 207 | 207 | { |
@@ -152,7 +152,7 @@ |
||
| 152 | 152 | ->groupBy('pid') // no support for distinct |
| 153 | 153 | ->andWhere( |
| 154 | 154 | 'pid > 0', |
| 155 | - 'uid_local = ' . $file->getUid() |
|
| 155 | + 'uid_local = '.$file->getUid() |
|
| 156 | 156 | ) |
| 157 | 157 | ->execute() |
| 158 | 158 | ->fetchAll(); |
@@ -268,7 +268,7 @@ |
||
| 268 | 268 | * Remove accent from a string |
| 269 | 269 | * |
| 270 | 270 | * @see https://github.com/alixaxel/phunction/blob/master/phunction/Text.php#L297 |
| 271 | - * @param $string |
|
| 271 | + * @param string $string |
|
| 272 | 272 | * @return string |
| 273 | 273 | */ |
| 274 | 274 | protected function unAccent($string) |
@@ -128,8 +128,8 @@ discard block |
||
| 128 | 128 | $uploadSize = $this->toBytes(ini_get('upload_max_filesize')); |
| 129 | 129 | |
| 130 | 130 | if ($postSize < $this->sizeLimit || $uploadSize < $this->sizeLimit) { |
| 131 | - $size = max(1, $this->sizeLimit / 1024 / 1024) . 'M'; |
|
| 132 | - $this->throwException('increase post_max_size and upload_max_filesize to ' . $size); |
|
| 131 | + $size = max(1, $this->sizeLimit / 1024 / 1024).'M'; |
|
| 132 | + $this->throwException('increase post_max_size and upload_max_filesize to '.$size); |
|
| 133 | 133 | } |
| 134 | 134 | } |
| 135 | 135 | |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | $isAllowed = $this->checkFileExtensionPermission($fileName); |
| 198 | 198 | if (!$isAllowed) { |
| 199 | 199 | $these = PermissionUtility::getInstance()->getAllowedExtensionList(); |
| 200 | - $this->throwException('File has an invalid extension, it should be one of ' . $these . '.'); |
|
| 200 | + $this->throwException('File has an invalid extension, it should be one of '.$these.'.'); |
|
| 201 | 201 | } |
| 202 | 202 | } |
| 203 | 203 | |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | */ |
| 256 | 256 | public function sanitizeFileName($fileName, $slug = '-', $extra = null) |
| 257 | 257 | { |
| 258 | - return trim(preg_replace('~[^0-9a-z_' . preg_quote($extra, '~') . ']+~i', $slug, $this->unAccent($fileName)), $slug); |
|
| 258 | + return trim(preg_replace('~[^0-9a-z_'.preg_quote($extra, '~').']+~i', $slug, $this->unAccent($fileName)), $slug); |
|
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | /** |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | */ |
| 294 | 294 | protected function initializeUploadFolder() |
| 295 | 295 | { |
| 296 | - $this->uploadFolder = PATH_site . self::UPLOAD_FOLDER; |
|
| 296 | + $this->uploadFolder = PATH_site.self::UPLOAD_FOLDER; |
|
| 297 | 297 | |
| 298 | 298 | // Initialize the upload folder for file transfer and create it if not yet existing |
| 299 | 299 | if (!file_exists($this->uploadFolder)) { |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | * Sanitize an id |
| 57 | 57 | * |
| 58 | 58 | * @param string $input |
| 59 | - * @return mixed |
|
| 59 | + * @return string |
|
| 60 | 60 | */ |
| 61 | 61 | protected function sanitizeId($input) |
| 62 | 62 | { |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | /** |
| 82 | - * @return boolean |
|
| 82 | + * @return boolean|null |
|
| 83 | 83 | */ |
| 84 | 84 | protected function configureStorage() |
| 85 | 85 | { |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | } |
| 303 | 303 | |
| 304 | 304 | /** |
| 305 | - * @return boolean |
|
| 305 | + * @return integer |
|
| 306 | 306 | */ |
| 307 | 307 | protected function canBeInitializedSilently() |
| 308 | 308 | { |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | $storage = $this->getMediaModule()->getCurrentStorage(); |
| 98 | - $this->getDatabaseConnection()->exec_UPDATEquery($tableName, 'uid = ' . $storage->getUid(), $values); |
|
| 98 | + $this->getDatabaseConnection()->exec_UPDATEquery($tableName, 'uid = '.$storage->getUid(), $values); |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | /** |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | */ |
| 112 | 112 | protected function getWarmUpSemaphoreFile() |
| 113 | 113 | { |
| 114 | - return PATH_site . 'typo3temp/.media_cache_warmed_up'; |
|
| 114 | + return PATH_site.'typo3temp/.media_cache_warmed_up'; |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | /** |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | return $queryBuilder |
| 255 | 255 | ->select('*') |
| 256 | 256 | ->from('sys_filemounts') |
| 257 | - ->where('uid = ' . $identifier) |
|
| 257 | + ->where('uid = '.$identifier) |
|
| 258 | 258 | ->execute() |
| 259 | 259 | ->fetch(); |
| 260 | 260 | } |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | { |
| 55 | 55 | $size = ConfigurationUtility::getInstance()->get($preset); |
| 56 | 56 | if (is_null($size)) { |
| 57 | - throw new \Fab\Media\Exception\EmptyValueException('No value for preset: ' . $preset, 1362501066); |
|
| 57 | + throw new \Fab\Media\Exception\EmptyValueException('No value for preset: '.$preset, 1362501066); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | $this->currentPreset = $preset; |
@@ -38,11 +38,11 @@ discard block |
||
| 38 | 38 | { |
| 39 | 39 | |
| 40 | 40 | // If file is not found, resolve the path |
| 41 | - if (!is_file(PATH_site . $resource)) { |
|
| 41 | + if (!is_file(PATH_site.$resource)) { |
|
| 42 | 42 | $resource = substr(self::resolvePath($resource), strlen(PATH_site)); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - return PathUtility::getRelativePathTo(PathUtility::dirname(PATH_site . $resource)) . PathUtility::basename($resource); |
|
| 45 | + return PathUtility::getRelativePathTo(PathUtility::dirname(PATH_site.$resource)).PathUtility::basename($resource); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /** |
@@ -54,8 +54,8 @@ discard block |
||
| 54 | 54 | static public function resolvePath($resource) |
| 55 | 55 | { |
| 56 | 56 | $resource = self::canonicalPath($resource); |
| 57 | - if (!is_file(PATH_site . $resource)) { |
|
| 58 | - $resource = 'EXT:' . GeneralUtility::camelCaseToLowerCaseUnderscored(self::$extensionName) . '/Resources/Public/' . $resource; |
|
| 57 | + if (!is_file(PATH_site.$resource)) { |
|
| 58 | + $resource = 'EXT:'.GeneralUtility::camelCaseToLowerCaseUnderscored(self::$extensionName).'/Resources/Public/'.$resource; |
|
| 59 | 59 | } |
| 60 | 60 | return GeneralUtility::getFileAbsFileName($resource); |
| 61 | 61 | } |
@@ -131,7 +131,7 @@ |
||
| 131 | 131 | public function prefixUri($uri) |
| 132 | 132 | { |
| 133 | 133 | if ($this->isFrontendMode() && $this->getFrontendObject()->absRefPrefix) { |
| 134 | - $uri = $this->getFrontendObject()->absRefPrefix . $uri; |
|
| 134 | + $uri = $this->getFrontendObject()->absRefPrefix.$uri; |
|
| 135 | 135 | } |
| 136 | 136 | return $uri; |
| 137 | 137 | } |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | |
| 92 | 92 | return sprintf('<img src="%s%s" title="%s" alt="%s" %s/>', |
| 93 | 93 | $result, |
| 94 | - $this->thumbnailService->getAppendTimeStamp() ? $parameterSeparator . $this->processedFile->getProperty('tstamp') : '', |
|
| 94 | + $this->thumbnailService->getAppendTimeStamp() ? $parameterSeparator.$this->processedFile->getProperty('tstamp') : '', |
|
| 95 | 95 | $this->getTitle(), |
| 96 | 96 | $this->getTitle(), |
| 97 | 97 | $this->renderAttributes() |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | |
| 147 | 147 | return sprintf('<a href="%s%s" target="%s" data-uid="%s">%s</a>', |
| 148 | 148 | $url, |
| 149 | - $this->thumbnailService->getAppendTimeStamp() && !$this->thumbnailService->getAnchorUri() ? $parameterSeparator . $file->getProperty('tstamp') : '', |
|
| 149 | + $this->thumbnailService->getAppendTimeStamp() && !$this->thumbnailService->getAnchorUri() ? $parameterSeparator.$file->getProperty('tstamp') : '', |
|
| 150 | 150 | $this->thumbnailService->getTarget(), |
| 151 | 151 | $file->getUid(), |
| 152 | 152 | $result |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | // Work around a bug in BackendUtility::getModuleUrl if matches is empty getModuleUrl() will not return the parameter. |
| 50 | 50 | $matches = $this->templateVariableContainer->get('matches'); |
| 51 | 51 | if (empty($matches)) { |
| 52 | - $moduleUrl .= '&' . urlencode(VidiModule::getParameterPrefix() . '[matches]='); |
|
| 52 | + $moduleUrl .= '&'.urlencode(VidiModule::getParameterPrefix().'[matches]='); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | return $moduleUrl; |