@@ -208,7 +208,7 @@ |
||
| 208 | 208 | $page = $query->select('doktype') |
| 209 | 209 | ->from('pages') |
| 210 | 210 | ->where('deleted = 0', |
| 211 | - 'uid = ' . $configuredPid) |
|
| 211 | + 'uid = '.$configuredPid) |
|
| 212 | 212 | ->execute() |
| 213 | 213 | ->fetch(); |
| 214 | 214 | |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | $this->tableName = $tableName; |
| 69 | 69 | |
| 70 | 70 | if (empty($GLOBALS['TCA'][$this->tableName])) { |
| 71 | - throw new InvalidKeyInArrayException('No TCA existence for table name: ' . $this->tableName, 1356945108); |
|
| 71 | + throw new InvalidKeyInArrayException('No TCA existence for table name: '.$this->tableName, 1356945108); |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | $this->tca = $GLOBALS['TCA'][$this->tableName]['grid']; |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | { |
| 171 | 171 | $fields = array_keys($this->getFields()); |
| 172 | 172 | if (empty($fields[$position])) { |
| 173 | - throw new InvalidKeyInArrayException('No field exist for position: ' . $position, 1356945119); |
|
| 173 | + throw new InvalidKeyInArrayException('No field exist for position: '.$position, 1356945119); |
|
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | return (string)$fields[$position]; |
@@ -686,7 +686,7 @@ discard block |
||
| 686 | 686 | $facet = GeneralUtility::makeInstance(StandardFacet::class, $facetName, $label); |
| 687 | 687 | |
| 688 | 688 | if (!$facet instanceof StandardFacet) { |
| 689 | - throw new \RuntimeException('I could not instantiate a facet for facet name "' . $facetName . '""', 1445856345); |
|
| 689 | + throw new \RuntimeException('I could not instantiate a facet for facet name "'.$facetName.'""', 1445856345); |
|
| 690 | 690 | } |
| 691 | 691 | return $facet; |
| 692 | 692 | } |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | \TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class |
| 34 | 34 | )->get('vidi'); |
| 35 | 35 | |
| 36 | - foreach (GeneralUtility::trimExplode(',', $configuration['data_types'],true) as $dataType) { |
|
| 36 | + foreach (GeneralUtility::trimExplode(',', $configuration['data_types'], true) as $dataType) { |
|
| 37 | 37 | if (!$moduleLoader->isRegistered($dataType)) { |
| 38 | 38 | $moduleLoader->setDataType($dataType) |
| 39 | 39 | #->isShown(false) |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | ] |
| 68 | 68 | ); |
| 69 | 69 | if (!empty($record)) { |
| 70 | - $moduleName = 'Vidi' . GeneralUtility::underscoredToUpperCamelCase($dataType) . 'M1'; |
|
| 70 | + $moduleName = 'Vidi'.GeneralUtility::underscoredToUpperCamelCase($dataType).'M1'; |
|
| 71 | 71 | $title = Tca::table($dataType)->getTitle(); |
| 72 | 72 | $modules[$moduleName] = $title; |
| 73 | 73 | } |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | if (isset($statementParts['keywords']['distinct'])) { |
| 128 | 128 | unset($statementParts['keywords']['distinct']); |
| 129 | 129 | $distinctField = $this->query->getDistinct() ? $this->query->getDistinct() : 'uid'; |
| 130 | - $statementParts['fields'] = array('COUNT(DISTINCT ' . $statementParts['mainTable'] . '.' . $distinctField . ')'); |
|
| 130 | + $statementParts['fields'] = array('COUNT(DISTINCT '.$statementParts['mainTable'].'.'.$distinctField.')'); |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | $sql = $this->buildQuery($statementParts); |
@@ -190,14 +190,14 @@ discard block |
||
| 190 | 190 | // tx_domain_model_foo0 (the alias) <--> tx_domain_model_foo (the origin table name) |
| 191 | 191 | $values = []; |
| 192 | 192 | foreach ($statementParts['fields'] as $key => $value) { |
| 193 | - $values[$key] = str_replace($tableName, $tableName . '0', $value); |
|
| 193 | + $values[$key] = str_replace($tableName, $tableName.'0', $value); |
|
| 194 | 194 | } |
| 195 | 195 | $statementParts['fields'] = $values; |
| 196 | 196 | |
| 197 | 197 | // Same comment as above. |
| 198 | 198 | $values = []; |
| 199 | 199 | foreach ($statementParts['where'] as $key => $value) { |
| 200 | - $values[$key] = str_replace($tableName . '0', $tableName, $value); |
|
| 200 | + $values[$key] = str_replace($tableName.'0', $tableName, $value); |
|
| 201 | 201 | } |
| 202 | 202 | $statementParts['where'] = $values; |
| 203 | 203 | |
@@ -236,25 +236,25 @@ discard block |
||
| 236 | 236 | if (!empty($statementParts['unions'])) { |
| 237 | 237 | foreach ($statementParts['unions'] as $tableName => $unionPart) { |
| 238 | 238 | if (!empty($statementParts['additionalWhereClause'][$tableName])) { |
| 239 | - $statementParts['unions'][$tableName] .= ' AND ' . implode(' AND ', $statementParts['additionalWhereClause'][$tableName]); |
|
| 239 | + $statementParts['unions'][$tableName] .= ' AND '.implode(' AND ', $statementParts['additionalWhereClause'][$tableName]); |
|
| 240 | 240 | } |
| 241 | 241 | } |
| 242 | 242 | } |
| 243 | 243 | |
| 244 | - $statement = 'SELECT ' . implode(' ', $statementParts['keywords']) . ' ' . implode(',', $statementParts['fields']) . ' FROM ' . implode(' ', $statementParts['tables']) . ' ' . implode(' ', $statementParts['unions']); |
|
| 244 | + $statement = 'SELECT '.implode(' ', $statementParts['keywords']).' '.implode(',', $statementParts['fields']).' FROM '.implode(' ', $statementParts['tables']).' '.implode(' ', $statementParts['unions']); |
|
| 245 | 245 | if (!empty($statementParts['where'])) { |
| 246 | - $statement .= ' WHERE ' . implode('', $statementParts['where']); |
|
| 246 | + $statement .= ' WHERE '.implode('', $statementParts['where']); |
|
| 247 | 247 | if (!empty($statementParts['additionalWhereClause'][$this->query->getType()])) { |
| 248 | - $statement .= ' AND ' . implode(' AND ', $statementParts['additionalWhereClause'][$this->query->getType()]); |
|
| 248 | + $statement .= ' AND '.implode(' AND ', $statementParts['additionalWhereClause'][$this->query->getType()]); |
|
| 249 | 249 | } |
| 250 | 250 | } elseif (!empty($statementParts['additionalWhereClause'])) { |
| 251 | - $statement .= ' WHERE ' . implode(' AND ', $statementParts['additionalWhereClause'][$this->query->getType()]); |
|
| 251 | + $statement .= ' WHERE '.implode(' AND ', $statementParts['additionalWhereClause'][$this->query->getType()]); |
|
| 252 | 252 | } |
| 253 | 253 | if (!empty($statementParts['orderings'])) { |
| 254 | - $statement .= ' ORDER BY ' . implode(', ', $statementParts['orderings']); |
|
| 254 | + $statement .= ' ORDER BY '.implode(', ', $statementParts['orderings']); |
|
| 255 | 255 | } |
| 256 | 256 | if (!empty($statementParts['limit'])) { |
| 257 | - $statement .= ' LIMIT ' . $statementParts['limit']; |
|
| 257 | + $statement .= ' LIMIT '.$statementParts['limit']; |
|
| 258 | 258 | } |
| 259 | 259 | |
| 260 | 260 | return $statement; |
@@ -270,9 +270,9 @@ discard block |
||
| 270 | 270 | protected function parseSource(SourceInterface $source, array &$sql) |
| 271 | 271 | { |
| 272 | 272 | $tableName = $this->getTableName(); |
| 273 | - $sql['fields'][$tableName] = $tableName . '.*'; |
|
| 273 | + $sql['fields'][$tableName] = $tableName.'.*'; |
|
| 274 | 274 | if ($this->query->getDistinct()) { |
| 275 | - $sql['fields'][$tableName] = $tableName . '.' . $this->query->getDistinct(); |
|
| 275 | + $sql['fields'][$tableName] = $tableName.'.'.$this->query->getDistinct(); |
|
| 276 | 276 | $sql['keywords']['distinct'] = 'DISTINCT'; |
| 277 | 277 | } |
| 278 | 278 | $sql['tables'][$tableName] = $tableName; |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | if ($realInput instanceof \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface) { |
| 411 | 411 | return $realInput->getUid(); |
| 412 | 412 | } else { |
| 413 | - throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception\UnexpectedTypeException('An object of class "' . get_class($realInput) . '" could not be converted to a plain value.', 1274799934); |
|
| 413 | + throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception\UnexpectedTypeException('An object of class "'.get_class($realInput).'" could not be converted to a plain value.', 1274799934); |
|
| 414 | 414 | } |
| 415 | 415 | } elseif (is_bool($input)) { |
| 416 | 416 | return $input === true ? 1 : 0; |
@@ -460,9 +460,9 @@ discard block |
||
| 460 | 460 | : '?'; |
| 461 | 461 | |
| 462 | 462 | if ($valueFunction === null) { |
| 463 | - $constraintSQL .= (!empty($tableName) ? $tableName . '.' : '') . $columnName . ' ' . $resolvedOperator . ' ' . $marker; |
|
| 463 | + $constraintSQL .= (!empty($tableName) ? $tableName.'.' : '').$columnName.' '.$resolvedOperator.' '.$marker; |
|
| 464 | 464 | } else { |
| 465 | - $constraintSQL .= $valueFunction . '(' . (!empty($tableName) ? $tableName . '.' : '') . $columnName . ') ' . $resolvedOperator . ' ' . $marker; |
|
| 465 | + $constraintSQL .= $valueFunction.'('.(!empty($tableName) ? $tableName.'.' : '').$columnName.') '.$resolvedOperator.' '.$marker; |
|
| 466 | 466 | } |
| 467 | 467 | |
| 468 | 468 | if (isset($tableName) && !empty($this->currentChildTableNameAlias)) { |
@@ -489,7 +489,7 @@ discard block |
||
| 489 | 489 | // to determine the relation type. Example for sys_category, property path will look like "items.sys_file" |
| 490 | 490 | $parts = explode('.', $propertyPath, 3); |
| 491 | 491 | if ($table->field($fieldName)->isGroup() && count($parts) > 2) { |
| 492 | - $explodedPropertyPath[0] = $parts[0] . '.' . $parts[1]; |
|
| 492 | + $explodedPropertyPath[0] = $parts[0].'.'.$parts[1]; |
|
| 493 | 493 | $explodedPropertyPath[1] = $parts[2]; |
| 494 | 494 | $fieldName = $explodedPropertyPath[0]; |
| 495 | 495 | } |
@@ -498,16 +498,16 @@ discard block |
||
| 498 | 498 | $childTableName = $table->field($fieldName)->getForeignTable(); |
| 499 | 499 | |
| 500 | 500 | if ($childTableName === null) { |
| 501 | - throw new Exception\InvalidRelationConfigurationException('The relation information for property "' . $fieldName . '" of class "' . $tableName . '" is missing.', 1353170925); |
|
| 501 | + throw new Exception\InvalidRelationConfigurationException('The relation information for property "'.$fieldName.'" of class "'.$tableName.'" is missing.', 1353170925); |
|
| 502 | 502 | } |
| 503 | 503 | |
| 504 | 504 | if ($table->field($fieldName)->hasOne()) { // includes relation "one-to-one" and "many-to-one" |
| 505 | 505 | // sometimes the opposite relation is not defined. We don't want to force this config for backward compatibility reasons. |
| 506 | 506 | // $parentKeyFieldName === null does the trick somehow. Before condition was if (isset($parentKeyFieldName)) |
| 507 | 507 | if ($table->field($fieldName)->hasRelationManyToOne() || $parentKeyFieldName === null) { |
| 508 | - $statementParts['unions'][$childTableName] = 'LEFT JOIN ' . $childTableName . ' ON ' . $tableName . '.' . $fieldName . '=' . $childTableName . '.uid'; |
|
| 508 | + $statementParts['unions'][$childTableName] = 'LEFT JOIN '.$childTableName.' ON '.$tableName.'.'.$fieldName.'='.$childTableName.'.uid'; |
|
| 509 | 509 | } else { |
| 510 | - $statementParts['unions'][$childTableName] = 'LEFT JOIN ' . $childTableName . ' ON ' . $tableName . '.uid=' . $childTableName . '.' . $parentKeyFieldName; |
|
| 510 | + $statementParts['unions'][$childTableName] = 'LEFT JOIN '.$childTableName.' ON '.$tableName.'.uid='.$childTableName.'.'.$parentKeyFieldName; |
|
| 511 | 511 | } |
| 512 | 512 | } elseif ($table->field($fieldName)->hasRelationManyToMany()) { |
| 513 | 513 | $relationTableName = $table->field($fieldName)->getManyToManyTable(); |
@@ -737,18 +737,18 @@ discard block |
||
| 737 | 737 | // If the table is found to have "workspace" support, add the corresponding fields in the statement. |
| 738 | 738 | if (Tca::table($tableName)->hasWorkspaceSupport()) { |
| 739 | 739 | if ($this->getBackendUser()->workspace === 0) { |
| 740 | - $statement .= ' AND ' . $tableName . '.t3ver_state<=' . new VersionState(VersionState::DEFAULT_STATE); |
|
| 740 | + $statement .= ' AND '.$tableName.'.t3ver_state<='.new VersionState(VersionState::DEFAULT_STATE); |
|
| 741 | 741 | } else { |
| 742 | 742 | // Show only records of live and of the current workspace |
| 743 | 743 | // In case we are in a Versioning preview |
| 744 | - $statement .= ' AND (' . |
|
| 745 | - $tableName . '.t3ver_wsid=0 OR ' . |
|
| 746 | - $tableName . '.t3ver_wsid=' . (int)$this->getBackendUser()->workspace . |
|
| 744 | + $statement .= ' AND ('. |
|
| 745 | + $tableName.'.t3ver_wsid=0 OR '. |
|
| 746 | + $tableName.'.t3ver_wsid='.(int)$this->getBackendUser()->workspace. |
|
| 747 | 747 | ')'; |
| 748 | 748 | } |
| 749 | 749 | |
| 750 | 750 | // Check if this segment make sense here or whether it should be in the "if" part when we have workspace = 0 |
| 751 | - $statement .= ' AND ' . $tableName . '.pid<>-1'; |
|
| 751 | + $statement .= ' AND '.$tableName.'.pid<>-1'; |
|
| 752 | 752 | } |
| 753 | 753 | |
| 754 | 754 | if (!$includeDeleted) { |
@@ -773,25 +773,25 @@ discard block |
||
| 773 | 773 | if (is_array($GLOBALS['TCA'][$tableName]['ctrl'])) { |
| 774 | 774 | if (!empty($GLOBALS['TCA'][$tableName]['ctrl']['languageField'])) { |
| 775 | 775 | // Select all entries for the current language |
| 776 | - $additionalWhereClause = $tableNameOrAlias . '.' . $GLOBALS['TCA'][$tableName]['ctrl']['languageField'] . ' IN (' . intval($querySettings->getLanguageUid()) . ',-1)'; |
|
| 776 | + $additionalWhereClause = $tableNameOrAlias.'.'.$GLOBALS['TCA'][$tableName]['ctrl']['languageField'].' IN ('.intval($querySettings->getLanguageUid()).',-1)'; |
|
| 777 | 777 | // If any language is set -> get those entries which are not translated yet |
| 778 | 778 | // They will be removed by t3lib_page::getRecordOverlay if not matching overlay mode |
| 779 | 779 | if (isset($GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField']) |
| 780 | 780 | && $querySettings->getLanguageUid() > 0 |
| 781 | 781 | ) { |
| 782 | - $additionalWhereClause .= ' OR (' . $tableNameOrAlias . '.' . $GLOBALS['TCA'][$tableName]['ctrl']['languageField'] . '=0' . |
|
| 783 | - ' AND ' . $tableNameOrAlias . '.uid NOT IN (SELECT ' . $tableName . '.' . $GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField'] . |
|
| 784 | - ' FROM ' . $tableName . |
|
| 785 | - ' WHERE ' . $tableName . '.' . $GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField'] . '>0' . |
|
| 786 | - ' AND ' . $tableName . '.' . $GLOBALS['TCA'][$tableName]['ctrl']['languageField'] . '>0'; |
|
| 782 | + $additionalWhereClause .= ' OR ('.$tableNameOrAlias.'.'.$GLOBALS['TCA'][$tableName]['ctrl']['languageField'].'=0'. |
|
| 783 | + ' AND '.$tableNameOrAlias.'.uid NOT IN (SELECT '.$tableName.'.'.$GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField']. |
|
| 784 | + ' FROM '.$tableName. |
|
| 785 | + ' WHERE '.$tableName.'.'.$GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField'].'>0'. |
|
| 786 | + ' AND '.$tableName.'.'.$GLOBALS['TCA'][$tableName]['ctrl']['languageField'].'>0'; |
|
| 787 | 787 | |
| 788 | 788 | // Add delete clause to ensure all entries are loaded |
| 789 | 789 | if (isset($GLOBALS['TCA'][$tableName]['ctrl']['delete'])) { |
| 790 | - $additionalWhereClause .= ' AND ' . $tableNameOrAlias . '.' . $GLOBALS['TCA'][$tableName]['ctrl']['delete'] . '=0'; |
|
| 790 | + $additionalWhereClause .= ' AND '.$tableNameOrAlias.'.'.$GLOBALS['TCA'][$tableName]['ctrl']['delete'].'=0'; |
|
| 791 | 791 | } |
| 792 | 792 | $additionalWhereClause .= '))'; |
| 793 | 793 | } |
| 794 | - $statementParts['additionalWhereClause'][$tableNameOrAlias][] = '(' . $additionalWhereClause . ')'; |
|
| 794 | + $statementParts['additionalWhereClause'][$tableNameOrAlias][] = '('.$additionalWhereClause.')'; |
|
| 795 | 795 | } |
| 796 | 796 | } |
| 797 | 797 | } |
@@ -836,7 +836,7 @@ discard block |
||
| 836 | 836 | protected function parseLimitAndOffset($limit, $offset, array &$statementParts) |
| 837 | 837 | { |
| 838 | 838 | if ($limit !== null && $offset !== null) { |
| 839 | - $statementParts['limit'] = intval($offset) . ', ' . intval($limit); |
|
| 839 | + $statementParts['limit'] = intval($offset).', '.intval($limit); |
|
| 840 | 840 | } elseif ($limit !== null) { |
| 841 | 841 | $statementParts['limit'] = intval($limit); |
| 842 | 842 | } |
@@ -904,11 +904,11 @@ discard block |
||
| 904 | 904 | ) { |
| 905 | 905 | $queryBuilder = $this->getQueryBuilder(); |
| 906 | 906 | $row = $queryBuilder |
| 907 | - ->select($tableName . '.*') |
|
| 907 | + ->select($tableName.'.*') |
|
| 908 | 908 | ->from($tableName) |
| 909 | 909 | ->andWhere( |
| 910 | - $tableName . '.uid=' . (int)$row[$GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField']], |
|
| 911 | - $tableName . '.' . $GLOBALS['TCA'][$tableName]['ctrl']['languageField'] . ' = 0' |
|
| 910 | + $tableName.'.uid='.(int)$row[$GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField']], |
|
| 911 | + $tableName.'.'.$GLOBALS['TCA'][$tableName]['ctrl']['languageField'].' = 0' |
|
| 912 | 912 | ) |
| 913 | 913 | ->execute() |
| 914 | 914 | ->fetch(); |
@@ -969,7 +969,7 @@ discard block |
||
| 969 | 969 | } |
| 970 | 970 | |
| 971 | 971 | $numberOfAliases = $this->tableNameAliases['aliasIncrement'][$tableName]; |
| 972 | - $tableNameAlias = $tableName . $numberOfAliases; |
|
| 972 | + $tableNameAlias = $tableName.$numberOfAliases; |
|
| 973 | 973 | |
| 974 | 974 | $this->tableNameAliases['aliasIncrement'][$tableName]++; |
| 975 | 975 | $this->tableNameAliases['aliases'][$tableNameAlias] = $tableName; |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | return [ |
| 5 | 5 | \Fab\Vidi\Domain\Model\Selection::class => [ |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | $content = str_replace('{module_name}', $label, $this->template); |
| 54 | 54 | GeneralUtility::writeFileToTypo3tempDir($languageFile, $content); |
| 55 | 55 | |
| 56 | - return 'LLL:' . $languageFile; |
|
| 56 | + return 'LLL:'.$languageFile; |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | /** |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | protected function getLanguageFile($dataType) |
| 64 | 64 | { |
| 65 | - return $this->getLanguageDirectory() . '/' . $dataType . '.xlf'; |
|
| 65 | + return $this->getLanguageDirectory().'/'.$dataType.'.xlf'; |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | /** |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | protected function getLanguageDirectory() |
| 72 | 72 | { |
| 73 | 73 | // Create language file dynamically |
| 74 | - $languageDirectory = Environment::getPublicPath() . '/typo3temp/vidi'; |
|
| 74 | + $languageDirectory = Environment::getPublicPath().'/typo3temp/vidi'; |
|
| 75 | 75 | if (!is_dir($languageDirectory)) { |
| 76 | 76 | GeneralUtility::mkdir($languageDirectory); |
| 77 | 77 | } |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | { |
| 45 | 45 | $templateNameAndPath = 'EXT:vidi/Resources/Private/Standalone/Tool/ModulePreferences/Launcher.html'; |
| 46 | 46 | $view = $this->initializeStandaloneView($templateNameAndPath); |
| 47 | - $view->assign('sitePath', Environment::getPublicPath() . '/'); |
|
| 47 | + $view->assign('sitePath', Environment::getPublicPath().'/'); |
|
| 48 | 48 | return $view->render(); |
| 49 | 49 | } |
| 50 | 50 | |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | { |
| 41 | 41 | $templateNameAndPath = 'EXT:vidi/Resources/Private/Standalone/Tool/RelationAnalyser/Launcher.html'; |
| 42 | 42 | $view = $this->initializeStandaloneView($templateNameAndPath); |
| 43 | - $view->assign('sitePath', Environment::getPublicPath() . '/'); |
|
| 43 | + $view->assign('sitePath', Environment::getPublicPath().'/'); |
|
| 44 | 44 | $view->assign('dataType', $this->getModuleLoader()->getDataType()); |
| 45 | 45 | return $view->render(); |
| 46 | 46 | } |