Completed
Push — master ( 02a2d0...8117b3 )
by Fabien
54:58
created
Tests/Unit/Utility/PathTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@  discard block
 block discarded – undo
32 32
 	 */
33 33
 	public function canResolvesAPath() {
34 34
 		$resourceName = uniqid('resource');
35
-		$expected = 'media/Resources/Public/' . $resourceName;
35
+		$expected = 'media/Resources/Public/'.$resourceName;
36 36
 		$actual = \Fab\Media\Utility\Path::resolvePath($resourceName);
37 37
 
38 38
 		$this->assertTrue(strpos($actual, $expected) > 0);
39
-		$this->assertEquals(0, strpos(Environment::getPublicPath() . '/', $expected));
39
+		$this->assertEquals(0, strpos(Environment::getPublicPath().'/', $expected));
40 40
 	}
41 41
 
42 42
 	/**
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
 	public function canReturnsAPublicPath() {
46 46
 
47 47
 		$resourceName = uniqid('resource');
48
-		$expected = 'media/Resources/Public/' . $resourceName;
48
+		$expected = 'media/Resources/Public/'.$resourceName;
49 49
 		$actual = \Fab\Media\Utility\Path::getRelativePath($resourceName);
50 50
 
51 51
 		$this->assertTrue(strpos($actual, $expected) > 0);
52
-		$this->assertFalse(strpos(Environment::getPublicPath() . '/', $expected));
52
+		$this->assertFalse(strpos(Environment::getPublicPath().'/', $expected));
53 53
 	}
54 54
 
55 55
 	/**
Please login to merge, or discard this patch.
Classes/View/Warning/ConfigurationWarning.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $connection->update(
99 99
             $tableName,
100 100
             $values,
101
-            [ 'uid' => $storage->getUid() ]
101
+            ['uid' => $storage->getUid()]
102 102
         );
103 103
     }
104 104
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      */
116 116
     protected function getWarmUpSemaphoreFile()
117 117
     {
118
-        return Environment::getPublicPath() . '/typo3temp/.media_cache_warmed_up';
118
+        return Environment::getPublicPath().'/typo3temp/.media_cache_warmed_up';
119 119
     }
120 120
 
121 121
     /**
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
         return $queryBuilder
259 259
             ->select('*')
260 260
             ->from('sys_filemounts')
261
-            ->where('uid = ' . $identifier)
261
+            ->where('uid = '.$identifier)
262 262
             ->execute()
263 263
             ->fetch();
264 264
     }
Please login to merge, or discard this patch.
Classes/Utility/Path.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
     {
34 34
 
35 35
         // If file is not found, resolve the path
36
-        if (!is_file(Environment::getPublicPath() . '/' . $resource)) {
37
-            $resource = substr(self::resolvePath($resource), strlen(Environment::getPublicPath() . '/'));
36
+        if (!is_file(Environment::getPublicPath().'/'.$resource)) {
37
+            $resource = substr(self::resolvePath($resource), strlen(Environment::getPublicPath().'/'));
38 38
         }
39 39
 
40
-        return PathUtility::getRelativePathTo(PathUtility::dirname(Environment::getPublicPath() . '/' . $resource)) . PathUtility::basename($resource);
40
+        return PathUtility::getRelativePathTo(PathUtility::dirname(Environment::getPublicPath().'/'.$resource)).PathUtility::basename($resource);
41 41
     }
42 42
 
43 43
     /**
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
     static public function resolvePath($resource)
50 50
     {
51 51
         $resource = self::canonicalPath($resource);
52
-        if (!is_file(Environment::getPublicPath() . '/' . $resource)) {
53
-            $resource = 'EXT:' . GeneralUtility::camelCaseToLowerCaseUnderscored(self::$extensionName) . '/Resources/Public/' . $resource;
52
+        if (!is_file(Environment::getPublicPath().'/'.$resource)) {
53
+            $resource = 'EXT:'.GeneralUtility::camelCaseToLowerCaseUnderscored(self::$extensionName).'/Resources/Public/'.$resource;
54 54
         }
55 55
         return GeneralUtility::getFileAbsFileName($resource);
56 56
     }
Please login to merge, or discard this patch.
Classes/Tool/MissingFilesFinderTool.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
     {
42 42
         $templateNameAndPath = 'EXT:media/Resources/Private/Standalone/Tool/MissingFilesFinder/Launcher.html';
43 43
         $view = $this->initializeStandaloneView($templateNameAndPath);
44
-        $view->assign('sitePath', Environment::getPublicPath() . '/');
44
+        $view->assign('sitePath', Environment::getPublicPath().'/');
45 45
         return $view->render();
46 46
     }
47 47
 
Please login to merge, or discard this patch.
Classes/Tool/DuplicateFilesFinderTool.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         $templateNameAndPath = 'EXT:media/Resources/Private/Standalone/Tool/DuplicateFilesFinder/Launcher.html';
42 42
         $view = $this->initializeStandaloneView($templateNameAndPath);
43 43
         $view->assign('isAdmin', $this->getBackendUser()->isAdmin());
44
-        $view->assign('sitePath', Environment::getPublicPath() . '/');
44
+        $view->assign('sitePath', Environment::getPublicPath().'/');
45 45
         return $view->render();
46 46
     }
47 47
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
                             foreach ($allowedMountPoints as $allowedMountPoint) {
110 110
 
111
-                                $pattern = '%^' . $allowedMountPoint . '%isU';
111
+                                $pattern = '%^'.$allowedMountPoint.'%isU';
112 112
                                 if (preg_match($pattern, $file['identifier'])) {
113 113
                                     $filteredFiles[] = $file;
114 114
                                     break; // no need to further loop around, stop the loop.
Please login to merge, or discard this patch.
Classes/Tool/ThumbnailGeneratorTool.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     {
40 40
         $templateNameAndPath = 'EXT:media/Resources/Private/Standalone/Tool/ThumbnailGenerator/Launcher.html';
41 41
         $view = $this->initializeStandaloneView($templateNameAndPath);
42
-        $view->assign('sitePath', Environment::getPublicPath() . '/');
42
+        $view->assign('sitePath', Environment::getPublicPath().'/');
43 43
         return $view->render();
44 44
     }
45 45
 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
                         $formattedResultSet[] = sprintf('* File "%s": %s %s',
82 82
                             $result['fileUid'],
83 83
                             $result['fileIdentifier'],
84
-                            empty($result['thumbnailUri']) ? '' : ' -> ' . $result['thumbnailUri']
84
+                            empty($result['thumbnailUri']) ? '' : ' -> '.$result['thumbnailUri']
85 85
                         );
86 86
                     }
87 87
 
Please login to merge, or discard this patch.
Classes/Tool/CacheWarmUpTool.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     {
38 38
         $templateNameAndPath = 'EXT:media/Resources/Private/Standalone/Tool/CacheWarmUp/Launcher.html';
39 39
         $view = $this->initializeStandaloneView($templateNameAndPath);
40
-        $view->assign('sitePath', Environment::getPublicPath() . '/');
40
+        $view->assign('sitePath', Environment::getPublicPath().'/');
41 41
         return $view->render();
42 42
     }
43 43
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      */
76 76
     protected function getWarmUpSemaphorFile()
77 77
     {
78
-        return Environment::getPublicPath() . '/typo3temp/.media_cache_warmed_up';
78
+        return Environment::getPublicPath().'/typo3temp/.media_cache_warmed_up';
79 79
     }
80 80
 
81 81
     /**
Please login to merge, or discard this patch.
Classes/Tool/DuplicateRecordsFinderTool.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
     {
40 40
         $templateNameAndPath = 'EXT:media/Resources/Private/Standalone/Tool/DuplicateRecordsFinder/Launcher.html';
41 41
         $view = $this->initializeStandaloneView($templateNameAndPath);
42
-        $view->assign('sitePath', Environment::getPublicPath() . '/');
42
+        $view->assign('sitePath', Environment::getPublicPath().'/');
43 43
         return $view->render();
44 44
     }
45 45
 
Please login to merge, or discard this patch.
Classes/FileUpload/UploadManager.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -129,8 +129,8 @@  discard block
 block discarded – undo
129 129
         $uploadSize = $this->toBytes(ini_get('upload_max_filesize'));
130 130
 
131 131
         if ($postSize < $this->sizeLimit || $uploadSize < $this->sizeLimit) {
132
-            $size = max(1, $this->sizeLimit / 1024 / 1024) . 'M';
133
-            $this->throwException('increase post_max_size and upload_max_filesize to ' . $size);
132
+            $size = max(1, $this->sizeLimit / 1024 / 1024).'M';
133
+            $this->throwException('increase post_max_size and upload_max_filesize to '.$size);
134 134
         }
135 135
     }
136 136
 
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
         $isAllowed = $this->checkFileExtensionPermission($fileName);
199 199
         if (!$isAllowed) {
200 200
             $these = PermissionUtility::getInstance()->getAllowedExtensionList();
201
-            $this->throwException('File has an invalid extension, it should be one of ' . $these . '.');
201
+            $this->throwException('File has an invalid extension, it should be one of '.$these.'.');
202 202
         }
203 203
     }
204 204
 
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
      */
257 257
     public function sanitizeFileName($fileName, $slug = '-', $extra = null)
258 258
     {
259
-        return trim(preg_replace('~[^0-9a-z_' . preg_quote($extra, '~') . ']+~i', $slug, $this->unAccent($fileName)), $slug);
259
+        return trim(preg_replace('~[^0-9a-z_'.preg_quote($extra, '~').']+~i', $slug, $this->unAccent($fileName)), $slug);
260 260
     }
261 261
 
262 262
     /**
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
      */
295 295
     protected function initializeUploadFolder()
296 296
     {
297
-        $this->uploadFolder = Environment::getPublicPath() . '/' . self::UPLOAD_FOLDER;
297
+        $this->uploadFolder = Environment::getPublicPath().'/'.self::UPLOAD_FOLDER;
298 298
 
299 299
         // Initialize the upload folder for file transfer and create it if not yet existing
300 300
         if (!file_exists($this->uploadFolder)) {
Please login to merge, or discard this patch.