@@ -74,6 +74,6 @@ |
||
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 | } |
@@ -52,14 +52,14 @@ |
||
52 | 52 | case 'yp': |
53 | 53 | $metaData = $originalFile->_getMetaData(); |
54 | 54 | |
55 | - return (float) $metaData['focus_point_' . substr($parts[1], 0, 1)]; |
|
55 | + return (float)$metaData['focus_point_' . substr($parts[1], 0, 1)]; |
|
56 | 56 | case 'xp_positive': |
57 | 57 | case 'yp_positive': |
58 | 58 | $metaData = $originalFile->_getMetaData(); |
59 | 59 | if ('xp_positive' == $parts[1]) { |
60 | - return (int) (abs($metaData['focus_point_' . substr($parts[1], 0, 1)] + 100) / 2); |
|
60 | + return (int)(abs($metaData['focus_point_' . substr($parts[1], 0, 1)] + 100) / 2); |
|
61 | 61 | } else { |
62 | - return (int) (abs($metaData['focus_point_' . substr($parts[1], 0, 1)] - 100) / 2); |
|
62 | + return (int)(abs($metaData['focus_point_' . substr($parts[1], 0, 1)] - 100) / 2); |
|
63 | 63 | } |
64 | 64 | // no break |
65 | 65 | case 'w': |
@@ -33,7 +33,7 @@ |
||
33 | 33 | throw new \Exception('File not found in metadata', 1475144028); |
34 | 34 | } |
35 | 35 | |
36 | - return self::getFileByUid((int) $row['file']); |
|
36 | + return self::getFileByUid((int)$row['file']); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | /** |
@@ -111,7 +111,7 @@ |
||
111 | 111 | if ('tt_content' !== $parts[0]) { |
112 | 112 | return null; |
113 | 113 | } |
114 | - $record = BackendUtility::getRecord($parts[0], (int) $parts[1]); |
|
114 | + $record = BackendUtility::getRecord($parts[0], (int)$parts[1]); |
|
115 | 115 | |
116 | 116 | return isset($record['image_ratio']) ? trim($record['image_ratio']) : null; |
117 | 117 | } |
@@ -57,7 +57,7 @@ |
||
57 | 57 | { |
58 | 58 | $databaseConnection = GlobalUtility::getDatabaseConnection(); |
59 | 59 | |
60 | - return (array) $databaseConnection->exec_SELECTgetRows( |
|
60 | + return (array)$databaseConnection->exec_SELECTgetRows( |
|
61 | 61 | '*', |
62 | 62 | 'tx_focuspoint_domain_model_dimension', |
63 | 63 | '1=1' . BackendUtility::deleteClause('tx_focuspoint_domain_model_dimension') |
@@ -60,8 +60,8 @@ discard block |
||
60 | 60 | */ |
61 | 61 | public function getFocusWidthAndHeight($width, $height, $ratio) |
62 | 62 | { |
63 | - $width = (int) $width; |
|
64 | - $height = (int) $height; |
|
63 | + $width = (int)$width; |
|
64 | + $height = (int)$height; |
|
65 | 65 | $ratio = $this->getRatio($ratio); |
66 | 66 | $widthDiff = $width / $ratio[0]; |
67 | 67 | $heightDiff = $height / $ratio[1]; |
@@ -69,11 +69,11 @@ discard block |
||
69 | 69 | if ($widthDiff < $heightDiff) { |
70 | 70 | return [ |
71 | 71 | $width, |
72 | - (int) ceil($widthDiff / $heightDiff * $height), |
|
72 | + (int)ceil($widthDiff / $heightDiff * $height), |
|
73 | 73 | ]; |
74 | 74 | } elseif ($widthDiff > $heightDiff) { |
75 | 75 | return [ |
76 | - (int) ceil($heightDiff / $widthDiff * $width), |
|
76 | + (int)ceil($heightDiff / $widthDiff * $width), |
|
77 | 77 | $height, |
78 | 78 | ]; |
79 | 79 | } |
@@ -131,12 +131,12 @@ discard block |
||
131 | 131 | protected function getShiftedFocusAreaPosition($length, $focusLength, $focusPosition, $invertScala = false) |
132 | 132 | { |
133 | 133 | $halfWidth = $length / 2; |
134 | - $pixelPosition = (int) floor($halfWidth * $focusPosition / 100 + $halfWidth); |
|
134 | + $pixelPosition = (int)floor($halfWidth * $focusPosition / 100 + $halfWidth); |
|
135 | 135 | if ($invertScala) { |
136 | 136 | $pixelPosition = $length - $pixelPosition; |
137 | 137 | } |
138 | - $crop1 = (int) ($pixelPosition - floor($focusLength / 2)); |
|
139 | - $crop2 = (int) ($crop1 + $focusLength); |
|
138 | + $crop1 = (int)($pixelPosition - floor($focusLength / 2)); |
|
139 | + $crop2 = (int)($crop1 + $focusLength); |
|
140 | 140 | if ($crop1 < 0) { |
141 | 141 | $crop1 -= $crop1; |
142 | 142 | } elseif ($crop2 > $length) { |
@@ -193,8 +193,8 @@ discard block |
||
193 | 193 | |
194 | 194 | $newFocusX = ($newRealFocusX - $newHalfWidth) * 100 / ($newHalfWidth); |
195 | 195 | $newFocusY = ($newHalfHeight - $newRealFocusY) * 100 / ($newHalfHeight); |
196 | - $newFocusX = (int) round($newFocusX, 0); |
|
197 | - $newFocusY = (int) round($newFocusY, 0); |
|
196 | + $newFocusX = (int)round($newFocusX, 0); |
|
197 | + $newFocusY = (int)round($newFocusY, 0); |
|
198 | 198 | |
199 | 199 | return [$newFocusX, $newFocusY]; |
200 | 200 | } |
@@ -217,12 +217,12 @@ discard block |
||
217 | 217 | } |
218 | 218 | |
219 | 219 | return [ |
220 | - MathUtility::canBeInterpretedAsInteger($ratio[0]) ? (int) $ratio[0] : (float) str_replace( |
|
220 | + MathUtility::canBeInterpretedAsInteger($ratio[0]) ? (int)$ratio[0] : (float)str_replace( |
|
221 | 221 | ',', |
222 | 222 | '.', |
223 | 223 | $ratio[0] |
224 | 224 | ), |
225 | - MathUtility::canBeInterpretedAsInteger($ratio[1]) ? (int) $ratio[1] : (float) str_replace( |
|
225 | + MathUtility::canBeInterpretedAsInteger($ratio[1]) ? (int)$ratio[1] : (float)str_replace( |
|
226 | 226 | ',', |
227 | 227 | '.', |
228 | 228 | $ratio[1] |
@@ -99,10 +99,10 @@ |
||
99 | 99 | } |
100 | 100 | $p = $parameter['P']; |
101 | 101 | if (isset($p['metaUid']) && MathUtility::canBeInterpretedAsInteger($p['metaUid'])) { |
102 | - return (int) $p['metaUid']; |
|
102 | + return (int)$p['metaUid']; |
|
103 | 103 | } |
104 | 104 | if (isset($p['table']) && 'sys_file_metadata' == $p['table'] && isset($p['uid']) && MathUtility::canBeInterpretedAsInteger($p['uid'])) { |
105 | - return (int) $p['uid']; |
|
105 | + return (int)$p['uid']; |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | return null; |
@@ -84,8 +84,8 @@ |
||
84 | 84 | protected function cleanupPosition($position) |
85 | 85 | { |
86 | 86 | return [ |
87 | - MathUtility::forceIntegerInRange((int) $position[0], -100, 100, 0), |
|
88 | - MathUtility::forceIntegerInRange((int) $position[1], -100, 100, 0), |
|
87 | + MathUtility::forceIntegerInRange((int)$position[0], -100, 100, 0), |
|
88 | + MathUtility::forceIntegerInRange((int)$position[1], -100, 100, 0), |
|
89 | 89 | ]; |
90 | 90 | } |
91 | 91 | } |
@@ -107,7 +107,7 @@ |
||
107 | 107 | } |
108 | 108 | $p = $parameter['P']; |
109 | 109 | if (isset($p['referenceUid']) && MathUtility::canBeInterpretedAsInteger($p['referenceUid'])) { |
110 | - return (int) $p['referenceUid']; |
|
110 | + return (int)$p['referenceUid']; |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | return null; |