@@ -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': |
@@ -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; |
@@ -113,11 +113,11 @@ |
||
| 113 | 113 | if ('tt_content' !== $parts[0]) { |
| 114 | 114 | throw new \Exception('Invalid part 0. part 0 have to be tt_content', 127383); |
| 115 | 115 | } |
| 116 | - $record = BackendUtility::getRecord($parts[0], (int) $parts[1]); |
|
| 116 | + $record = BackendUtility::getRecord($parts[0], (int)$parts[1]); |
|
| 117 | 117 | if (!isset($record['image_ratio'])) { |
| 118 | 118 | throw new \Exception('No image_ratio found in the current record', 324672); |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | - return trim((string) $record['image_ratio']); |
|
| 121 | + return trim((string)$record['image_ratio']); |
|
| 122 | 122 | } |
| 123 | 123 | } |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | { |
| 58 | 58 | $table = 'tx_focuspoint_domain_model_dimension'; |
| 59 | 59 | $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table); |
| 60 | - return (array) $queryBuilder->select('*') |
|
| 60 | + return (array)$queryBuilder->select('*') |
|
| 61 | 61 | ->from($table) |
| 62 | 62 | ->execute() |
| 63 | 63 | ->fetchAll(); |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | $sysFileMatadataRepository = GeneralUtility::makeInstance(SysFileMetadataRepository::class); |
| 88 | 88 | $row = $sysFileMatadataRepository->findByFileUid((int)$fileUid); |
| 89 | 89 | if ($row) { |
| 90 | - $sysFileMatadataRepository->updateByUid((int) $row['uid'], $values); |
|
| 90 | + $sysFileMatadataRepository->updateByUid((int)$row['uid'], $values); |
|
| 91 | 91 | } |
| 92 | 92 | } |
| 93 | 93 | |
@@ -104,7 +104,7 @@ discard block |
||
| 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 | return null; |
@@ -79,7 +79,7 @@ |
||
| 79 | 79 | $connection->update( |
| 80 | 80 | self::TABLE, |
| 81 | 81 | $values, |
| 82 | - ['uid' => (int) $rows[0]['uid']] |
|
| 82 | + ['uid' => (int)$rows[0]['uid']] |
|
| 83 | 83 | ); |
| 84 | 84 | } else { |
| 85 | 85 | $connection->insert( |
@@ -84,8 +84,8 @@ |
||
| 84 | 84 | protected function cleanupPosition(array $position):array |
| 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 | } |
@@ -146,13 +146,13 @@ discard block |
||
| 146 | 146 | } |
| 147 | 147 | $docRoot = rtrim(GeneralUtility::getIndpEnv('TYPO3_DOCUMENT_ROOT'), '/') . '/'; |
| 148 | 148 | $relativeSrc = str_replace($docRoot, '', $absoluteImageName); |
| 149 | - $focusPointX = MathUtility::forceIntegerInRange((int) $x, -100, 100, 0); |
|
| 150 | - $focusPointY = MathUtility::forceIntegerInRange((int) $y, -100, 100, 0); |
|
| 149 | + $focusPointX = MathUtility::forceIntegerInRange((int)$x, -100, 100, 0); |
|
| 150 | + $focusPointY = MathUtility::forceIntegerInRange((int)$y, -100, 100, 0); |
|
| 151 | 151 | |
| 152 | 152 | if (0 === $focusPointX && 0 === $focusPointY) { |
| 153 | 153 | $table = Group::TABLE; |
| 154 | 154 | $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table); |
| 155 | - $rows = (array) $queryBuilder->select('uid', 'focus_point_x', 'focus_point_y') |
|
| 155 | + $rows = (array)$queryBuilder->select('uid', 'focus_point_x', 'focus_point_y') |
|
| 156 | 156 | ->from($table) |
| 157 | 157 | ->where( |
| 158 | 158 | $queryBuilder->expr()->eq('relative_file_path', $queryBuilder->createNamedParameter($relativeSrc)) |
@@ -161,8 +161,8 @@ discard block |
||
| 161 | 161 | ->fetchAll(); |
| 162 | 162 | |
| 163 | 163 | if (!empty($rows)) { |
| 164 | - $focusPointX = MathUtility::forceIntegerInRange((int) $rows[0]['focus_point_x'], -100, 100, 0); |
|
| 165 | - $focusPointY = MathUtility::forceIntegerInRange((int) $rows[0]['focus_point_y'], -100, 100, 0); |
|
| 164 | + $focusPointX = MathUtility::forceIntegerInRange((int)$rows[0]['focus_point_x'], -100, 100, 0); |
|
| 165 | + $focusPointY = MathUtility::forceIntegerInRange((int)$rows[0]['focus_point_y'], -100, 100, 0); |
|
| 166 | 166 | } |
| 167 | 167 | } |
| 168 | 168 | |