Completed
Push — master ( f5775a...d27d3a )
by Tim
15:31
created
Classes/Hooks/FileList.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,6 +74,6 @@
 block discarded – undo
74 74
             throw new \Exception('No meta data found', 1475144024);
75 75
         }
76 76
 
77
-        return (int) $metaData['uid'];
77
+        return (int)$metaData['uid'];
78 78
     }
79 79
 }
Please login to merge, or discard this patch.
Classes/Utility/FileUtility.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,12 +26,12 @@
 block discarded – undo
26 26
      */
27 27
     public static function getFileByMetaData($uid)
28 28
     {
29
-        $row = GeneralUtility::makeInstance(SysFileMetadataRepository::class)->findByUid((int) $uid);
29
+        $row = GeneralUtility::makeInstance(SysFileMetadataRepository::class)->findByUid((int)$uid);
30 30
         if (!isset($row['file'])) {
31 31
             throw new \Exception('File not found in metadata', 1475144028);
32 32
         }
33 33
 
34
-        return self::getFileByUid((int) $row['file']);
34
+        return self::getFileByUid((int)$row['file']);
35 35
     }
36 36
 
37 37
     /**
Please login to merge, or discard this patch.
Classes/Hooks/GetData.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,14 +53,14 @@
 block discarded – undo
53 53
                 case 'yp':
54 54
                     $metaData = $originalFile->_getMetaData();
55 55
 
56
-                    return (float) $metaData['focus_point_' . \mb_substr($parts[1], 0, 1)];
56
+                    return (float)$metaData['focus_point_' . \mb_substr($parts[1], 0, 1)];
57 57
                 case 'xp_positive':
58 58
                 case 'yp_positive':
59 59
                     $metaData = $originalFile->_getMetaData();
60 60
                     if ('xp_positive' === $parts[1]) {
61
-                        return (int) (\abs($metaData['focus_point_' . \mb_substr($parts[1], 0, 1)] + 100) / 2);
61
+                        return (int)(\abs($metaData['focus_point_' . \mb_substr($parts[1], 0, 1)] + 100) / 2);
62 62
                     }
63
-                    return (int) (\abs($metaData['focus_point_' . \mb_substr($parts[1], 0, 1)] - 100) / 2);
63
+                    return (int)(\abs($metaData['focus_point_' . \mb_substr($parts[1], 0, 1)] - 100) / 2);
64 64
                 case 'w':
65 65
                 case 'h':
66 66
                     $fileName = GeneralUtility::getFileAbsFileName($fileObject->getPublicUrl(true));
Please login to merge, or discard this patch.
Classes/Xclass/LocalCropScaleMaskHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -115,11 +115,11 @@
 block discarded – undo
115 115
         if ('tt_content' !== $parts[0]) {
116 116
             throw new \Exception('Invalid part 0. part 0 have to be tt_content', 127383);
117 117
         }
118
-        $record = BackendUtility::getRecord($parts[0], (int) $parts[1]);
118
+        $record = BackendUtility::getRecord($parts[0], (int)$parts[1]);
119 119
         if (!isset($record['image_ratio'])) {
120 120
             throw new \Exception('No image_ratio found in the current record', 324672);
121 121
         }
122 122
 
123
-        return \trim((string) $record['image_ratio']);
123
+        return \trim((string)$record['image_ratio']);
124 124
     }
125 125
 }
Please login to merge, or discard this patch.
Classes/Service/WizardHandler/File.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      */
46 46
     public function getCurrentPoint()
47 47
     {
48
-        $row = GeneralUtility::makeInstance(SysFileMetadataRepository::class)->findByUid((int) $this->getMataDataUid());
48
+        $row = GeneralUtility::makeInstance(SysFileMetadataRepository::class)->findByUid((int)$this->getMataDataUid());
49 49
 
50 50
         return $this->cleanupPosition([
51 51
             $row['focus_point_x'],
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             'focus_point_y' => MathUtility::forceIntegerInRange($y, -100, 100, 0),
67 67
         ];
68 68
 
69
-        GeneralUtility::makeInstance(SysFileMetadataRepository::class)->update((int) $this->getMataDataUid(), $values);
69
+        GeneralUtility::makeInstance(SysFileMetadataRepository::class)->update((int)$this->getMataDataUid(), $values);
70 70
     }
71 71
 
72 72
     /**
@@ -94,10 +94,10 @@  discard block
 block discarded – undo
94 94
         }
95 95
         $p = $parameter['P'];
96 96
         if (isset($p['metaUid']) && MathUtility::canBeInterpretedAsInteger($p['metaUid'])) {
97
-            return (int) $p['metaUid'];
97
+            return (int)$p['metaUid'];
98 98
         }
99 99
         if (isset($p['table']) && 'sys_file_metadata' === $p['table'] && isset($p['uid']) && MathUtility::canBeInterpretedAsInteger($p['uid'])) {
100
-            return (int) $p['uid'];
100
+            return (int)$p['uid'];
101 101
         }
102 102
     }
103 103
 }
Please login to merge, or discard this patch.
Classes/Service/WizardHandler/FileReference.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -78,16 +78,16 @@  discard block
 block discarded – undo
78 78
             'focus_point_y' => MathUtility::forceIntegerInRange($y, -100, 100, 0),
79 79
         ];
80 80
 
81
-        GeneralUtility::makeInstance(SysFileReferenceRepository::class)->update((int) $this->getReferenceUid(), $values);
81
+        GeneralUtility::makeInstance(SysFileReferenceRepository::class)->update((int)$this->getReferenceUid(), $values);
82 82
 
83 83
         // save also to the file
84 84
         $reference = ResourceFactory::getInstance()->getFileReferenceObject($this->getReferenceUid());
85 85
         $fileUid = $reference->getOriginalFile()->getUid();
86 86
 
87 87
         $sysFileMatadataRepository = GeneralUtility::makeInstance(SysFileMetadataRepository::class);
88
-        $row = $sysFileMatadataRepository->findOneByFileUid((int) $fileUid);
88
+        $row = $sysFileMatadataRepository->findOneByFileUid((int)$fileUid);
89 89
         if ($row) {
90
-            $sysFileMatadataRepository->update((int) $row['uid'], $values);
90
+            $sysFileMatadataRepository->update((int)$row['uid'], $values);
91 91
         }
92 92
     }
93 93
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         }
105 105
         $p = $parameter['P'];
106 106
         if (isset($p['referenceUid']) && MathUtility::canBeInterpretedAsInteger($p['referenceUid'])) {
107
-            return (int) $p['referenceUid'];
107
+            return (int)$p['referenceUid'];
108 108
         }
109 109
     }
110 110
 }
Please login to merge, or discard this patch.
Classes/Service/DimensionService.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
      */
63 63
     public function getFocusWidthAndHeight(int $width, int $height, string $ratio): array
64 64
     {
65
-        $width = (int) $width;
66
-        $height = (int) $height;
65
+        $width = (int)$width;
66
+        $height = (int)$height;
67 67
         $ratio = $this->getRatio($ratio);
68 68
         $widthDiff = $width / $ratio[0];
69 69
         $heightDiff = $height / $ratio[1];
@@ -71,12 +71,12 @@  discard block
 block discarded – undo
71 71
         if ($widthDiff < $heightDiff) {
72 72
             return [
73 73
                 $width,
74
-                (int) \ceil($widthDiff / $heightDiff * $height),
74
+                (int)\ceil($widthDiff / $heightDiff * $height),
75 75
             ];
76 76
         }
77 77
         if ($widthDiff > $heightDiff) {
78 78
             return [
79
-                (int) \ceil($heightDiff / $widthDiff * $width),
79
+                (int)\ceil($heightDiff / $widthDiff * $width),
80 80
                 $height,
81 81
             ];
82 82
         }
@@ -162,8 +162,8 @@  discard block
 block discarded – undo
162 162
 
163 163
         $newFocusX = ($newRealFocusX - $newHalfWidth) * 100 / ($newHalfWidth);
164 164
         $newFocusY = ($newHalfHeight - $newRealFocusY) * 100 / ($newHalfHeight);
165
-        $newFocusX = (int) \round($newFocusX, 0);
166
-        $newFocusY = (int) \round($newFocusY, 0);
165
+        $newFocusX = (int)\round($newFocusX, 0);
166
+        $newFocusY = (int)\round($newFocusY, 0);
167 167
 
168 168
         return [$newFocusX, $newFocusY];
169 169
     }
@@ -186,12 +186,12 @@  discard block
 block discarded – undo
186 186
         }
187 187
 
188 188
         return [
189
-            MathUtility::canBeInterpretedAsInteger($ratio[0]) ? (int) $ratio[0] : (float) \str_replace(
189
+            MathUtility::canBeInterpretedAsInteger($ratio[0]) ? (int)$ratio[0] : (float)\str_replace(
190 190
                 ',',
191 191
                 '.',
192 192
                 $ratio[0]
193 193
             ),
194
-            MathUtility::canBeInterpretedAsInteger($ratio[1]) ? (int) $ratio[1] : (float) \str_replace(
194
+            MathUtility::canBeInterpretedAsInteger($ratio[1]) ? (int)$ratio[1] : (float)\str_replace(
195 195
                 ',',
196 196
                 '.',
197 197
                 $ratio[1]
@@ -212,12 +212,12 @@  discard block
 block discarded – undo
212 212
     protected function getShiftedFocusAreaPosition(int $length, int $focusLength, int $focusPosition, bool $invertScala = false): array
213 213
     {
214 214
         $halfWidth = $length / 2;
215
-        $pixelPosition = (int) \floor($halfWidth * $focusPosition / 100 + $halfWidth);
215
+        $pixelPosition = (int)\floor($halfWidth * $focusPosition / 100 + $halfWidth);
216 216
         if ($invertScala) {
217 217
             $pixelPosition = $length - $pixelPosition;
218 218
         }
219
-        $crop1 = (int) ($pixelPosition - \floor($focusLength / 2));
220
-        $crop2 = (int) ($crop1 + $focusLength);
219
+        $crop1 = (int)($pixelPosition - \floor($focusLength / 2));
220
+        $crop2 = (int)($crop1 + $focusLength);
221 221
         if ($crop1 < 0) {
222 222
             $crop1 -= $crop1;
223 223
         } elseif ($crop2 > $length) {
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
     {
246 246
         $row = GeneralUtility::makeInstance(DimensionRepository::class)->findOneByIdentifier($ratio);
247 247
         if (isset($row['dimension'])) {
248
-            return (string) $row['dimension'];
248
+            return (string)$row['dimension'];
249 249
         }
250 250
 
251 251
         return $ratio;
Please login to merge, or discard this patch.
Classes/Domain/Repository/AbstractRawRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     {
45 45
         $queryBuilder = $this->getQueryBuilder();
46 46
 
47
-        return (array) $queryBuilder->select('*')
47
+        return (array)$queryBuilder->select('*')
48 48
             ->from($this->getTableName())
49 49
             ->execute()
50 50
             ->fetchAll();
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         $this->getConnection()->update(
62 62
             $this->getTableName(),
63 63
             $values,
64
-            ['uid' => (int) $uid]
64
+            ['uid' => (int)$uid]
65 65
         );
66 66
     }
67 67
 
Please login to merge, or discard this patch.
Classes/Service/WizardHandler/Group.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
 
59 59
         if (isset($row['uid'])) {
60 60
             $fileStandaloneRepository->update(
61
-                (int) $row['uid'],
61
+                (int)$row['uid'],
62 62
                 $values
63 63
             );
64 64
         } else {
Please login to merge, or discard this patch.