Completed
Push — master ( b70884...5fde98 )
by Fabien
55:11
created
Classes/ViewHelpers/Be/AdditionalAssetsViewHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,9 +58,9 @@
 block discarded – undo
58 58
     protected function resolvePath($uri)
59 59
     {
60 60
         $uri = GeneralUtility::getFileAbsFileName($uri);
61
-        $uri = substr($uri, strlen(Environment::getPublicPath() . '/'));
61
+        $uri = substr($uri, strlen(Environment::getPublicPath().'/'));
62 62
         if (ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST'])->isBackend() && $uri !== false) {
63
-            $uri = '../' . $uri;
63
+            $uri = '../'.$uri;
64 64
         }
65 65
         return $uri;
66 66
     }
Please login to merge, or discard this patch.
Classes/ViewHelpers/Be/RequireJsViewHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
         $pageRenderer->addJsInlineCode('vidi-inline', $content);
34 34
 
35 35
         $publicResourcesPath = PathUtility::getPublicResourceWebPath('EXT:vidi/Resources/Public/');
36
-        $configuration['paths']['Fab/Vidi'] = $publicResourcesPath . 'JavaScript';
36
+        $configuration['paths']['Fab/Vidi'] = $publicResourcesPath.'JavaScript';
37 37
         $pageRenderer->addRequireJsConfiguration($configuration);
38 38
         $pageRenderer->loadRequireJsModule('Fab/Vidi/Vidi/Main');
39 39
     }
Please login to merge, or discard this patch.
Classes/ViewHelpers/Result/ToXlsViewHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
         $response->withHeader('Expires', '0');
104 104
         $response->withHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0');
105 105
         $response->withHeader('Content-Type', 'application/vnd.ms-excel');
106
-        $response->withHeader('Content-Disposition', 'attachment; filename="' . basename($this->exportFileNameAndPath) . '"');
106
+        $response->withHeader('Content-Disposition', 'attachment; filename="'.basename($this->exportFileNameAndPath).'"');
107 107
         $response->withHeader('Content-Length', filesize($this->exportFileNameAndPath));
108 108
         $response->withHeader('Content-Description', 'File Transfer');
109 109
         $response->withHeader('Content-Transfer-Encoding', 'binary');
Please login to merge, or discard this patch.
Tests/Functional/Grid/RelationRendererTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 use Fab\Vidi\Domain\Model\Content;
18 18
 use Fab\Vidi\Tests\Functional\AbstractFunctionalTestCase;
19 19
 
20
-require_once dirname(dirname(__FILE__)) . '/AbstractFunctionalTestCase.php';
20
+require_once dirname(dirname(__FILE__)).'/AbstractFunctionalTestCase.php';
21 21
 
22 22
 /**
23 23
  * Test case for class \Fab\Vidi\Grid\CategoryRenderer.
Please login to merge, or discard this patch.
Classes/ViewHelpers/Result/ToXmlViewHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@
 block discarded – undo
123 123
         /** @var Response $response */
124 124
         $response = $this->templateVariableContainer->get('response');
125 125
         $response->withHeader('Content-Type', 'application/xml');
126
-        $response->withHeader('Content-Disposition', 'attachment; filename="' . basename($this->exportFileNameAndPath) . '"');
126
+        $response->withHeader('Content-Disposition', 'attachment; filename="'.basename($this->exportFileNameAndPath).'"');
127 127
         $response->withHeader('Content-Length', filesize($this->exportFileNameAndPath));
128 128
         $response->withHeader('Content-Description', 'File Transfer');
129 129
     }
Please login to merge, or discard this patch.
Classes/ViewHelpers/Result/AbstractToFormatViewHelper.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -87,15 +87,15 @@  discard block
 block discarded – undo
87 87
         /** @var Content $object */
88 88
         $object = reset($objects);
89 89
 
90
-        $this->temporaryDirectory = Environment::getPublicPath() . '/typo3temp/' . uniqid() . '/';
90
+        $this->temporaryDirectory = Environment::getPublicPath().'/typo3temp/'.uniqid().'/';
91 91
         GeneralUtility::mkdir($this->temporaryDirectory);
92 92
 
93 93
         // Compute file name and path variable
94
-        $this->exportFileNameAndPath = $this->temporaryDirectory . $object->getDataType() . '-' . date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy']);
94
+        $this->exportFileNameAndPath = $this->temporaryDirectory.$object->getDataType().'-'.date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy']);
95 95
 
96 96
         // Compute file name and path variable for zip
97
-        $zipFileName = $object->getDataType() . '-' . date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy']) . '.zip';
98
-        $this->zipFileNameAndPath = $this->temporaryDirectory . $zipFileName;
97
+        $zipFileName = $object->getDataType().'-'.date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy']).'.zip';
98
+        $this->zipFileNameAndPath = $this->temporaryDirectory.$zipFileName;
99 99
     }
100 100
 
101 101
     /**
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
         $response->withHeader('Expires', '0');
164 164
         $response->withHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0');
165 165
         $response->withHeader('Content-Type', 'application/zip');
166
-        $response->withHeader('Content-Disposition', 'attachment; filename="' . basename($this->zipFileNameAndPath) . '"');
166
+        $response->withHeader('Content-Disposition', 'attachment; filename="'.basename($this->zipFileNameAndPath).'"');
167 167
         $response->withHeader('Content-Length', filesize($this->zipFileNameAndPath));
168 168
         $response->withHeader('Content-Description', 'File Transfer');
169 169
         $response->withHeader('Content-Transfer-Encoding', 'binary');
Please login to merge, or discard this patch.
Classes/ViewHelpers/Result/ToCsvViewHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
         /** @var Response $response */
98 98
         $response = $this->templateVariableContainer->get('response');
99 99
         $response->withHeader('Content-Type', 'application/csv');
100
-        $response->withHeader('Content-Disposition', 'attachment; filename="' . basename($this->exportFileNameAndPath) . '"');
100
+        $response->withHeader('Content-Disposition', 'attachment; filename="'.basename($this->exportFileNameAndPath).'"');
101 101
         $response->withHeader('Content-Length', filesize($this->exportFileNameAndPath));
102 102
         $response->withHeader('Content-Description', 'File Transfer');
103 103
     }
Please login to merge, or discard this patch.
Classes/Persistence/Storage/VidiDbBackend.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
             if (isset($statementParts['keywords']['distinct'])) {
170 170
                 unset($statementParts['keywords']['distinct']);
171 171
                 $distinctField = $this->query->getDistinct() ? $this->query->getDistinct() : 'uid';
172
-                $statementParts['fields'] = array('COUNT(DISTINCT ' . $statementParts['mainTable'] . '.' . $distinctField . ')');
172
+                $statementParts['fields'] = array('COUNT(DISTINCT '.$statementParts['mainTable'].'.'.$distinctField.')');
173 173
             }
174 174
 
175 175
             $sql = $this->buildQuery($statementParts);
@@ -232,14 +232,14 @@  discard block
 block discarded – undo
232 232
             // tx_domain_model_foo0 (the alias) <--> tx_domain_model_foo (the origin table name)
233 233
             $values = [];
234 234
             foreach ($statementParts['fields'] as $key => $value) {
235
-                $values[$key] = str_replace($tableName, $tableName . '0', $value);
235
+                $values[$key] = str_replace($tableName, $tableName.'0', $value);
236 236
             }
237 237
             $statementParts['fields'] = $values;
238 238
 
239 239
             // Same comment as above.
240 240
             $values = [];
241 241
             foreach ($statementParts['where'] as $key => $value) {
242
-                $values[$key] = str_replace($tableName . '0', $tableName, $value);
242
+                $values[$key] = str_replace($tableName.'0', $tableName, $value);
243 243
             }
244 244
             $statementParts['where'] = $values;
245 245
 
@@ -278,25 +278,25 @@  discard block
 block discarded – undo
278 278
         if (!empty($statementParts['unions'])) {
279 279
             foreach ($statementParts['unions'] as $tableName => $unionPart) {
280 280
                 if (!empty($statementParts['additionalWhereClause'][$tableName])) {
281
-                    $statementParts['unions'][$tableName] .= ' AND ' . implode(' AND ', $statementParts['additionalWhereClause'][$tableName]);
281
+                    $statementParts['unions'][$tableName] .= ' AND '.implode(' AND ', $statementParts['additionalWhereClause'][$tableName]);
282 282
                 }
283 283
             }
284 284
         }
285 285
 
286
-        $statement = 'SELECT ' . implode(' ', $statementParts['keywords']) . ' ' . implode(',', $statementParts['fields']) . ' FROM ' . implode(' ', $statementParts['tables']) . ' ' . implode(' ', $statementParts['unions']);
286
+        $statement = 'SELECT '.implode(' ', $statementParts['keywords']).' '.implode(',', $statementParts['fields']).' FROM '.implode(' ', $statementParts['tables']).' '.implode(' ', $statementParts['unions']);
287 287
         if (!empty($statementParts['where'])) {
288
-            $statement .= ' WHERE ' . implode('', $statementParts['where']);
288
+            $statement .= ' WHERE '.implode('', $statementParts['where']);
289 289
             if (!empty($statementParts['additionalWhereClause'][$this->query->getType()])) {
290
-                $statement .= ' AND ' . implode(' AND ', $statementParts['additionalWhereClause'][$this->query->getType()]);
290
+                $statement .= ' AND '.implode(' AND ', $statementParts['additionalWhereClause'][$this->query->getType()]);
291 291
             }
292 292
         } elseif (!empty($statementParts['additionalWhereClause'])) {
293
-            $statement .= ' WHERE ' . implode(' AND ', $statementParts['additionalWhereClause'][$this->query->getType()]);
293
+            $statement .= ' WHERE '.implode(' AND ', $statementParts['additionalWhereClause'][$this->query->getType()]);
294 294
         }
295 295
         if (!empty($statementParts['orderings'])) {
296
-            $statement .= ' ORDER BY ' . implode(', ', $statementParts['orderings']);
296
+            $statement .= ' ORDER BY '.implode(', ', $statementParts['orderings']);
297 297
         }
298 298
         if (!empty($statementParts['limit'])) {
299
-            $statement .= ' LIMIT ' . $statementParts['limit'];
299
+            $statement .= ' LIMIT '.$statementParts['limit'];
300 300
         }
301 301
 
302 302
         return $statement;
@@ -312,9 +312,9 @@  discard block
 block discarded – undo
312 312
     protected function parseSource(SourceInterface $source, array &$sql)
313 313
     {
314 314
         $tableName = $this->getTableName();
315
-        $sql['fields'][$tableName] = $tableName . '.*';
315
+        $sql['fields'][$tableName] = $tableName.'.*';
316 316
         if ($this->query->getDistinct()) {
317
-            $sql['fields'][$tableName] = $tableName . '.' . $this->query->getDistinct();
317
+            $sql['fields'][$tableName] = $tableName.'.'.$this->query->getDistinct();
318 318
             $sql['keywords']['distinct'] = 'DISTINCT';
319 319
         }
320 320
         $sql['tables'][$tableName] = $tableName;
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
             if ($realInput instanceof DomainObjectInterface) {
453 453
                 return $realInput->getUid();
454 454
             } else {
455
-                throw new UnexpectedTypeException('An object of class "' . get_class($realInput) . '" could not be converted to a plain value.', 1274799934);
455
+                throw new UnexpectedTypeException('An object of class "'.get_class($realInput).'" could not be converted to a plain value.', 1274799934);
456 456
             }
457 457
         } elseif (is_bool($input)) {
458 458
             return $input === true ? 1 : 0;
@@ -502,9 +502,9 @@  discard block
 block discarded – undo
502 502
                 : '?';
503 503
 
504 504
             if ($valueFunction === null) {
505
-                $constraintSQL .= (!empty($tableName) ? $tableName . '.' : '') . $columnName . ' ' . $resolvedOperator . ' ' . $marker;
505
+                $constraintSQL .= (!empty($tableName) ? $tableName.'.' : '').$columnName.' '.$resolvedOperator.' '.$marker;
506 506
             } else {
507
-                $constraintSQL .= $valueFunction . '(' . (!empty($tableName) ? $tableName . '.' : '') . $columnName . ') ' . $resolvedOperator . ' ' . $marker;
507
+                $constraintSQL .= $valueFunction.'('.(!empty($tableName) ? $tableName.'.' : '').$columnName.') '.$resolvedOperator.' '.$marker;
508 508
             }
509 509
 
510 510
             if (isset($tableName) && !empty($this->currentChildTableNameAlias)) {
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
         // to determine the relation type. Example for sys_category, property path will look like "items.sys_file"
532 532
         $parts = explode('.', $propertyPath, 3);
533 533
         if ($table->field($fieldName)->isGroup() && count($parts) > 2) {
534
-            $explodedPropertyPath[0] = $parts[0] . '.' . $parts[1];
534
+            $explodedPropertyPath[0] = $parts[0].'.'.$parts[1];
535 535
             $explodedPropertyPath[1] = $parts[2];
536 536
             $fieldName = $explodedPropertyPath[0];
537 537
         }
@@ -540,16 +540,16 @@  discard block
 block discarded – undo
540 540
         $childTableName = $table->field($fieldName)->getForeignTable();
541 541
 
542 542
         if ($childTableName === null) {
543
-            throw new InvalidRelationConfigurationException('The relation information for property "' . $fieldName . '" of class "' . $tableName . '" is missing.', 1353170925);
543
+            throw new InvalidRelationConfigurationException('The relation information for property "'.$fieldName.'" of class "'.$tableName.'" is missing.', 1353170925);
544 544
         }
545 545
 
546 546
         if ($table->field($fieldName)->hasOne()) { // includes relation "one-to-one" and "many-to-one"
547 547
             // sometimes the opposite relation is not defined. We don't want to force this config for backward compatibility reasons.
548 548
             // $parentKeyFieldName === null does the trick somehow. Before condition was if (isset($parentKeyFieldName))
549 549
             if ($table->field($fieldName)->hasRelationManyToOne() || $parentKeyFieldName === null) {
550
-                $statementParts['unions'][$childTableName] = 'LEFT JOIN ' . $childTableName . ' ON ' . $tableName . '.' . $fieldName . '=' . $childTableName . '.uid';
550
+                $statementParts['unions'][$childTableName] = 'LEFT JOIN '.$childTableName.' ON '.$tableName.'.'.$fieldName.'='.$childTableName.'.uid';
551 551
             } else {
552
-                $statementParts['unions'][$childTableName] = 'LEFT JOIN ' . $childTableName . ' ON ' . $tableName . '.uid=' . $childTableName . '.' . $parentKeyFieldName;
552
+                $statementParts['unions'][$childTableName] = 'LEFT JOIN '.$childTableName.' ON '.$tableName.'.uid='.$childTableName.'.'.$parentKeyFieldName;
553 553
             }
554 554
         } elseif ($table->field($fieldName)->hasRelationManyToMany()) {
555 555
             $relationTableName = $table->field($fieldName)->getManyToManyTable();
@@ -779,18 +779,18 @@  discard block
 block discarded – undo
779 779
         // If the table is found to have "workspace" support, add the corresponding fields in the statement.
780 780
         if (Tca::table($tableName)->hasWorkspaceSupport()) {
781 781
             if ($this->getBackendUser()->workspace === 0) {
782
-                $statement .= ' AND ' . $tableName . '.t3ver_state<=' . new VersionState(VersionState::DEFAULT_STATE);
782
+                $statement .= ' AND '.$tableName.'.t3ver_state<='.new VersionState(VersionState::DEFAULT_STATE);
783 783
             } else {
784 784
                 // Show only records of live and of the current workspace
785 785
                 // In case we are in a Versioning preview
786
-                $statement .= ' AND (' .
787
-                    $tableName . '.t3ver_wsid=0 OR ' .
788
-                    $tableName . '.t3ver_wsid=' . (int)$this->getBackendUser()->workspace .
786
+                $statement .= ' AND ('.
787
+                    $tableName.'.t3ver_wsid=0 OR '.
788
+                    $tableName.'.t3ver_wsid='.(int)$this->getBackendUser()->workspace.
789 789
                     ')';
790 790
             }
791 791
 
792 792
             // Check if this segment make sense here or whether it should be in the "if" part when we have workspace = 0
793
-            $statement .= ' AND ' . $tableName . '.pid<>-1';
793
+            $statement .= ' AND '.$tableName.'.pid<>-1';
794 794
         }
795 795
 
796 796
         if (!$includeDeleted) {
@@ -815,25 +815,25 @@  discard block
 block discarded – undo
815 815
         if (is_array($GLOBALS['TCA'][$tableName]['ctrl'])) {
816 816
             if (!empty($GLOBALS['TCA'][$tableName]['ctrl']['languageField'])) {
817 817
                 // Select all entries for the current language
818
-                $additionalWhereClause = $tableNameOrAlias . '.' . $GLOBALS['TCA'][$tableName]['ctrl']['languageField'] . ' IN (' . intval($querySettings->getLanguageUid()) . ',-1)';
818
+                $additionalWhereClause = $tableNameOrAlias.'.'.$GLOBALS['TCA'][$tableName]['ctrl']['languageField'].' IN ('.intval($querySettings->getLanguageUid()).',-1)';
819 819
                 // If any language is set -> get those entries which are not translated yet
820 820
                 // They will be removed by t3lib_page::getRecordOverlay if not matching overlay mode
821 821
                 if (isset($GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField'])
822 822
                     && $querySettings->getLanguageUid() > 0
823 823
                 ) {
824
-                    $additionalWhereClause .= ' OR (' . $tableNameOrAlias . '.' . $GLOBALS['TCA'][$tableName]['ctrl']['languageField'] . '=0' .
825
-                        ' AND ' . $tableNameOrAlias . '.uid NOT IN (SELECT ' . $tableName . '.' . $GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField'] .
826
-                        ' FROM ' . $tableName .
827
-                        ' WHERE ' . $tableName . '.' . $GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField'] . '>0' .
828
-                        ' AND ' . $tableName . '.' . $GLOBALS['TCA'][$tableName]['ctrl']['languageField'] . '>0';
824
+                    $additionalWhereClause .= ' OR ('.$tableNameOrAlias.'.'.$GLOBALS['TCA'][$tableName]['ctrl']['languageField'].'=0'.
825
+                        ' AND '.$tableNameOrAlias.'.uid NOT IN (SELECT '.$tableName.'.'.$GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField'].
826
+                        ' FROM '.$tableName.
827
+                        ' WHERE '.$tableName.'.'.$GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField'].'>0'.
828
+                        ' AND '.$tableName.'.'.$GLOBALS['TCA'][$tableName]['ctrl']['languageField'].'>0';
829 829
 
830 830
                     // Add delete clause to ensure all entries are loaded
831 831
                     if (isset($GLOBALS['TCA'][$tableName]['ctrl']['delete'])) {
832
-                        $additionalWhereClause .= ' AND ' . $tableNameOrAlias . '.' . $GLOBALS['TCA'][$tableName]['ctrl']['delete'] . '=0';
832
+                        $additionalWhereClause .= ' AND '.$tableNameOrAlias.'.'.$GLOBALS['TCA'][$tableName]['ctrl']['delete'].'=0';
833 833
                     }
834 834
                     $additionalWhereClause .= '))';
835 835
                 }
836
-                $statementParts['additionalWhereClause'][$tableNameOrAlias][] = '(' . $additionalWhereClause . ')';
836
+                $statementParts['additionalWhereClause'][$tableNameOrAlias][] = '('.$additionalWhereClause.')';
837 837
             }
838 838
         }
839 839
     }
@@ -878,7 +878,7 @@  discard block
 block discarded – undo
878 878
     protected function parseLimitAndOffset($limit, $offset, array &$statementParts)
879 879
     {
880 880
         if ($limit !== null && $offset !== null) {
881
-            $statementParts['limit'] = intval($offset) . ', ' . intval($limit);
881
+            $statementParts['limit'] = intval($offset).', '.intval($limit);
882 882
         } elseif ($limit !== null) {
883 883
             $statementParts['limit'] = intval($limit);
884 884
         }
@@ -946,11 +946,11 @@  discard block
 block discarded – undo
946 946
             ) {
947 947
                 $queryBuilder = $this->getQueryBuilder();
948 948
                 $row = $queryBuilder
949
-                    ->select($tableName . '.*')
949
+                    ->select($tableName.'.*')
950 950
                     ->from($tableName)
951 951
                     ->andWhere(
952
-                        $tableName . '.uid=' . (int)$row[$GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField']],
953
-                        $tableName . '.' . $GLOBALS['TCA'][$tableName]['ctrl']['languageField'] . ' = 0'
952
+                        $tableName.'.uid='.(int)$row[$GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField']],
953
+                        $tableName.'.'.$GLOBALS['TCA'][$tableName]['ctrl']['languageField'].' = 0'
954 954
                     )
955 955
                     ->execute()
956 956
                     ->fetch();
@@ -1011,7 +1011,7 @@  discard block
 block discarded – undo
1011 1011
         }
1012 1012
 
1013 1013
         $numberOfAliases = $this->tableNameAliases['aliasIncrement'][$tableName];
1014
-        $tableNameAlias = $tableName . $numberOfAliases;
1014
+        $tableNameAlias = $tableName.$numberOfAliases;
1015 1015
 
1016 1016
         $this->tableNameAliases['aliasIncrement'][$tableName]++;
1017 1017
         $this->tableNameAliases['aliases'][$tableNameAlias] = $tableName;
Please login to merge, or discard this patch.
Classes/Persistence/Query.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -174,8 +174,8 @@
 block discarded – undo
174 174
             $configuration = $backendConfigurationManager->getTypoScriptSetup();
175 175
             $querySettings = array('respectSysLanguage');
176 176
             foreach ($querySettings as $setting) {
177
-                if (isset($configuration['config.']['tx_vidi.']['persistence.']['backend.'][$this->type . '.'][$setting])) {
178
-                    $value = (bool)$configuration['config.']['tx_vidi.']['persistence.']['backend.'][$this->type . '.'][$setting];
177
+                if (isset($configuration['config.']['tx_vidi.']['persistence.']['backend.'][$this->type.'.'][$setting])) {
178
+                    $value = (bool)$configuration['config.']['tx_vidi.']['persistence.']['backend.'][$this->type.'.'][$setting];
179 179
                     ObjectAccess::setProperty($this->typo3QuerySettings, $setting, $value);
180 180
                 }
181 181
             }
Please login to merge, or discard this patch.