Passed
Pull Request — master (#105)
by Alexander
05:13
created
Classes/Updates/MigrateSettings.php 3 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function getDescription(): string
56 56
     {
57
-        return 'This wizard migrates existing front end plugins of the extension Kitodo.Presentation (dlf) to' .
58
-            ' make use of the Extbase naming scheme. Therefore it updates the field values' .
57
+        return 'This wizard migrates existing front end plugins of the extension Kitodo.Presentation (dlf) to'.
58
+            ' make use of the Extbase naming scheme. Therefore it updates the field values'.
59 59
             ' "pi_flexform" within the tt_content table';
60 60
     }
61 61
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         foreach ($fields as $field) {
171 171
             // change the index attribute if it doesn't start with 'settings.' yet
172 172
             if (strpos($field['index'], 'settings.') === false) {
173
-                $field['index'] = 'settings.' . $field['index'];
173
+                $field['index'] = 'settings.'.$field['index'];
174 174
             }
175 175
         }
176 176
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
  * Class MigrateSettings
24 24
  * @internal
25 25
  */
26
-class MigrateSettings implements UpgradeWizardInterface
27
-{
26
+class MigrateSettings implements UpgradeWizardInterface {
28 27
 
29 28
     /**
30 29
      * Return the identifier for this wizard
Please login to merge, or discard this patch.
Upper-Lower-Casing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -97,11 +97,11 @@  discard block
 block discarded – undo
97 97
 
98 98
             // exit if at least one update statement is not successful
99 99
             if (!((bool) $updateResult)) {
100
-                return false;
100
+                return FALSE;
101 101
             }
102 102
         }
103 103
 
104
-        return true;
104
+        return TRUE;
105 105
     }
106 106
 
107 107
     /**
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      */
114 114
     public function updateNecessary(): bool
115 115
     {
116
-        $oldSettingsFound = false;
116
+        $oldSettingsFound = FALSE;
117 117
 
118 118
         $connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('tt_content');
119 119
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         // Update the found record sets
132 132
         while ($record = $statement->fetch()) {
133 133
             $oldSettingsFound = $this->checkForOldSettings($record['pi_flexform']);
134
-            if ($oldSettingsFound === true) {
134
+            if ($oldSettingsFound === TRUE) {
135 135
                 // We found at least one field to be updated --> break here
136 136
                 break;
137 137
             }
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 
170 170
         foreach ($fields as $field) {
171 171
             // change the index attribute if it doesn't start with 'settings.' yet
172
-            if (strpos($field['index'], 'settings.') === false) {
172
+            if (strpos($field['index'], 'settings.') === FALSE) {
173 173
                 $field['index'] = 'settings.' . $field['index'];
174 174
             }
175 175
         }
Please login to merge, or discard this patch.
Classes/Updates/FileLocationUpdater.php 3 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -172,9 +172,9 @@  discard block
 block discarded – undo
172 172
                             $queryBuilder->createNamedParameter('', \PDO::PARAM_STR)
173 173
                         ),
174 174
                         $queryBuilder->expr()->comparison(
175
-                            'CAST(CAST(' . $queryBuilder->quoteIdentifier($this->fieldsToMigrate[$table]) . ' AS DECIMAL) AS CHAR)',
175
+                            'CAST(CAST('.$queryBuilder->quoteIdentifier($this->fieldsToMigrate[$table]).' AS DECIMAL) AS CHAR)',
176 176
                             ExpressionBuilder::NEQ,
177
-                            'CAST(' . $queryBuilder->quoteIdentifier($this->fieldsToMigrate[$table]) . ' AS CHAR)'
177
+                            'CAST('.$queryBuilder->quoteIdentifier($this->fieldsToMigrate[$table]).' AS CHAR)'
178 178
                         )
179 179
                     )
180 180
                     ->orderBy('uid')
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
                 }
188 188
             } catch (DBALException $e) {
189 189
                 throw new \RuntimeException(
190
-                    'Database query failed. Error was: ' . $e->getPrevious()->getMessage(),
190
+                    'Database query failed. Error was: '.$e->getPrevious()->getMessage(),
191 191
                     1511950673
192 192
                 );
193 193
             }
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
         $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
247 247
 
248 248
         $fileUid = null;
249
-        $sourcePath = Environment::getPublicPath() . '/' . $fieldItem;
249
+        $sourcePath = Environment::getPublicPath().'/'.$fieldItem;
250 250
 
251 251
         // maybe the file was already moved, so check if the original file still exists
252 252
         if (file_exists($sourcePath)) {
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -153,8 +153,7 @@  discard block
 block discarded – undo
153 153
      * @return array|int
154 154
      * @throws \RuntimeException
155 155
      */
156
-    protected function getRecordsFromTable($countOnly = false)
157
-    {
156
+    protected function getRecordsFromTable($countOnly = false) {
158 157
         $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
159 158
         $allResults = [];
160 159
         $numResults = 0;
@@ -234,8 +233,7 @@  discard block
 block discarded – undo
234 233
      * @param array $row
235 234
      * @throws \Exception
236 235
      */
237
-    protected function migrateField($table, $row)
238
-    {
236
+    protected function migrateField($table, $row) {
239 237
         $fieldItem = trim($row[$this->fieldsToMigrate[$table]]);
240 238
 
241 239
         if (empty($fieldItem) || is_numeric($fieldItem)) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -97,11 +97,11 @@  discard block
 block discarded – undo
97 97
      */
98 98
     public function updateNecessary(): bool
99 99
     {
100
-        $numRecords = $this->getRecordsFromTable(true);
100
+        $numRecords = $this->getRecordsFromTable(TRUE);
101 101
         if ($numRecords > 0) {
102
-            return true;
102
+            return TRUE;
103 103
         }
104
-        return false;
104
+        return FALSE;
105 105
     }
106 106
 
107 107
     /**
@@ -131,15 +131,15 @@  discard block
 block discarded – undo
131 131
      */
132 132
     public function executeUpdate(): bool
133 133
     {
134
-        $result = true;
134
+        $result = TRUE;
135 135
         try {
136
-            $numRecords = $this->getRecordsFromTable(true);
136
+            $numRecords = $this->getRecordsFromTable(TRUE);
137 137
             if ($numRecords > 0) {
138 138
                 $this->performUpdate();
139 139
             }
140 140
         } catch (\Exception $e) {
141 141
             // If something goes wrong, migrateField() logs an error
142
-            $result = false;
142
+            $result = FALSE;
143 143
         }
144 144
         return $result;
145 145
     }
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
      * @return array|int
154 154
      * @throws \RuntimeException
155 155
      */
156
-    protected function getRecordsFromTable($countOnly = false)
156
+    protected function getRecordsFromTable($countOnly = FALSE)
157 157
     {
158 158
         $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
159 159
         $allResults = [];
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
                     ->orderBy('uid')
181 181
                     ->execute()
182 182
                     ->fetchAll();
183
-                if ($countOnly === true) {
183
+                if ($countOnly === TRUE) {
184 184
                     $numResults += count($result);
185 185
                 } else {
186 186
                     $allResults[$table] = $result;
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
             }
194 194
         }
195 195
 
196
-        if ($countOnly === true) {
196
+        if ($countOnly === TRUE) {
197 197
             return $numResults;
198 198
         } else {
199 199
             return $allResults;
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
      */
209 209
     protected function performUpdate(): bool
210 210
     {
211
-        $result = true;
211
+        $result = TRUE;
212 212
 
213 213
         try {
214 214
             $storages = GeneralUtility::makeInstance(StorageRepository::class)->findAll();
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
                 }
222 222
             }
223 223
         } catch (\Exception $e) {
224
-            $result = false;
224
+            $result = FALSE;
225 225
         }
226 226
 
227 227
         return $result;
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
         $storageUid = (int) $this->storage->getUid();
246 246
         $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
247 247
 
248
-        $fileUid = null;
248
+        $fileUid = NULL;
249 249
         $sourcePath = Environment::getPublicPath() . '/' . $fieldItem;
250 250
 
251 251
         // maybe the file was already moved, so check if the original file still exists
Please login to merge, or discard this patch.
Classes/ViewHelpers/JsFooterViewHelper.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,13 +19,11 @@
 block discarded – undo
19 19
 /**
20 20
  * Add inline JavaScript code to footer *
21 21
  */
22
-class JsFooterViewHelper extends AbstractViewHelper
23
-{
22
+class JsFooterViewHelper extends AbstractViewHelper {
24 23
     /**
25 24
      * Initialize arguments.
26 25
      */
27
-    public function initializeArguments()
28
-    {
26
+    public function initializeArguments() {
29 27
         parent::initializeArguments();
30 28
         $this->registerArgument('inlineCode', 'string', 'Inline JavaScript', true);
31 29
     }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
     public function initializeArguments()
28 28
     {
29 29
         parent::initializeArguments();
30
-        $this->registerArgument('inlineCode', 'string', 'Inline JavaScript', true);
30
+        $this->registerArgument('inlineCode', 'string', 'Inline JavaScript', TRUE);
31 31
     }
32 32
 
33 33
     /**
Please login to merge, or discard this patch.
Classes/Controller/PageViewController.php 3 patches
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -26,8 +26,7 @@  discard block
 block discarded – undo
26 26
  * @subpackage dlf
27 27
  * @access public
28 28
  */
29
-class PageViewController extends AbstractController
30
-{
29
+class PageViewController extends AbstractController {
31 30
     /**
32 31
      * Holds the controls to add to the map
33 32
      *
@@ -65,8 +64,7 @@  discard block
 block discarded – undo
65 64
      *
66 65
      * @return void
67 66
      */
68
-    public function mainAction()
69
-    {
67
+    public function mainAction() {
70 68
         // Load current document.
71 69
         $this->loadDocument($this->requestData);
72 70
         if (
@@ -121,8 +119,7 @@  discard block
 block discarded – undo
121 119
      *
122 120
      * @return array URL and MIME type of fulltext file
123 121
      */
124
-    protected function getFulltext($page)
125
-    {
122
+    protected function getFulltext($page) {
126 123
         $fulltext = [];
127 124
         // Get fulltext link.
128 125
         $fileGrpsFulltext = GeneralUtility::trimExplode(',', $this->extConf['fileGrpFulltext']);
@@ -162,8 +159,7 @@  discard block
 block discarded – undo
162 159
      *
163 160
      * @return void
164 161
      */
165
-    protected function addViewerJS()
166
-    {
162
+    protected function addViewerJS() {
167 163
         // Viewer configuration.
168 164
         $viewerConfiguration = '$(document).ready(function() {
169 165
                 if (dlfUtils.exists(dlfViewer)) {
@@ -189,8 +185,7 @@  discard block
 block discarded – undo
189 185
      * @return array An array containing the IRIs of the AnnotationLists / AnnotationPages as well as
190 186
      *               some information about the canvas.
191 187
      */
192
-    protected function getAnnotationContainers($page)
193
-    {
188
+    protected function getAnnotationContainers($page) {
194 189
         if ($this->document->getDoc() instanceof IiifManifest) {
195 190
             $canvasId = $this->document->getDoc()->physicalStructure[$page];
196 191
             $iiif = $this->document->getDoc()->getIiif();
@@ -246,8 +241,7 @@  discard block
 block discarded – undo
246 241
      *
247 242
      * @return array URL and MIME type of image file
248 243
      */
249
-    protected function getImage($page)
250
-    {
244
+    protected function getImage($page) {
251 245
         $image = [];
252 246
         // Get @USE value of METS fileGrp.
253 247
         $fileGrpsImages = GeneralUtility::trimExplode(',', $this->extConf['fileGrpImages']);
Please login to merge, or discard this patch.
Upper-Lower-Casing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         // Load current document.
71 71
         $this->loadDocument($this->requestData);
72 72
         if (
73
-            $this->document === null
73
+            $this->document === NULL
74 74
             || $this->document->getDoc()->numPages < 1
75 75
         ) {
76 76
             // Quit without doing anything if required variables are not set.
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
                     // Configure @action URL for form.
134 134
                     $uri = $this->uriBuilder->reset()
135 135
                         ->setTargetPageUid($GLOBALS['TSFE']->id)
136
-                        ->setCreateAbsoluteUri(!empty($this->settings['forceAbsoluteUrl']) ? true : false)
136
+                        ->setCreateAbsoluteUri(!empty($this->settings['forceAbsoluteUrl']) ? TRUE : FALSE)
137 137
                         ->setArguments([
138 138
                             'eID' => 'tx_dlf_pageview_proxy',
139 139
                             'url' => $fulltext['url'],
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
             if ($iiif instanceof ManifestInterface) {
198 198
                 $canvas = $iiif->getContainedResourceById($canvasId);
199 199
                 /* @var $canvas \Ubl\Iiif\Presentation\Common\Model\Resources\CanvasInterface */
200
-                if ($canvas != null && !empty($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING))) {
200
+                if ($canvas != NULL && !empty($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING))) {
201 201
                     $annotationContainers = [];
202 202
                     /*
203 203
                      *  TODO Analyzing the annotations on the server side requires loading the annotation lists / pages
@@ -207,11 +207,11 @@  discard block
 block discarded – undo
207 207
                      *  On the other hand, server connections are potentially better than client connections. Downloading annotation lists
208 208
                      */
209 209
                     foreach ($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING) as $annotationContainer) {
210
-                        if (($textAnnotations = $annotationContainer->getTextAnnotations(Motivation::PAINTING)) != null) {
210
+                        if (($textAnnotations = $annotationContainer->getTextAnnotations(Motivation::PAINTING)) != NULL) {
211 211
                             foreach ($textAnnotations as $annotation) {
212 212
                                 if (
213 213
                                     $annotation->getBody()->getFormat() == 'text/plain'
214
-                                    && $annotation->getBody()->getChars() != null
214
+                                    && $annotation->getBody()->getChars() != NULL
215 215
                                 ) {
216 216
                                     $annotationListData = [];
217 217
                                     $annotationListData['uri'] = $annotationContainer->getId();
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
                     // Configure @action URL for form.
260 260
                     $uri = $this->uriBuilder->reset()
261 261
                         ->setTargetPageUid($GLOBALS['TSFE']->id)
262
-                        ->setCreateAbsoluteUri(!empty($this->settings['forceAbsoluteUrl']) ? true : false)
262
+                        ->setCreateAbsoluteUri(!empty($this->settings['forceAbsoluteUrl']) ? TRUE : FALSE)
263 263
                         ->setArguments([
264 264
                             'eID' => 'tx_dlf_pageview_proxy',
265 265
                             'url' => $image['url'],
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -146,11 +146,11 @@  discard block
 block discarded – undo
146 146
                 $fulltext['mimetype'] = $this->document->getDoc()->getFileMimeType($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$page]]['files'][$fileGrpFulltext]);
147 147
                 break;
148 148
             } else {
149
-                $this->logger->notice('No full-text file found for page "' . $page . '" in fileGrp "' . $fileGrpFulltext . '"');
149
+                $this->logger->notice('No full-text file found for page "'.$page.'" in fileGrp "'.$fileGrpFulltext.'"');
150 150
             }
151 151
         }
152 152
         if (empty($fulltext)) {
153
-            $this->logger->notice('No full-text file found for page "' . $page . '" in fileGrps "' . $this->settings['fileGrpFulltext'] . '"');
153
+            $this->logger->notice('No full-text file found for page "'.$page.'" in fileGrps "'.$this->settings['fileGrpFulltext'].'"');
154 154
         }
155 155
         return $fulltext;
156 156
     }
@@ -168,12 +168,12 @@  discard block
 block discarded – undo
168 168
         $viewerConfiguration = '$(document).ready(function() {
169 169
                 if (dlfUtils.exists(dlfViewer)) {
170 170
                     tx_dlf_viewer = new dlfViewer({
171
-                        controls: ["' . implode('", "', $this->controls) . '"],
172
-                        div: "' . $this->settings['elementId'] . '",
173
-                        images: ' . json_encode($this->images) . ',
174
-                        fulltexts: ' . json_encode($this->fulltexts) . ',
175
-                        annotationContainers: ' . json_encode($this->annotationContainers) . ',
176
-                        useInternalProxy: ' . ($this->settings['useInternalProxy'] ? 1 : 0) . '
171
+                        controls: ["' . implode('", "', $this->controls).'"],
172
+                        div: "' . $this->settings['elementId'].'",
173
+                        images: ' . json_encode($this->images).',
174
+                        fulltexts: ' . json_encode($this->fulltexts).',
175
+                        annotationContainers: ' . json_encode($this->annotationContainers).',
176
+                        useInternalProxy: ' . ($this->settings['useInternalProxy'] ? 1 : 0).'
177 177
                     });
178 178
                 }
179 179
             });';
@@ -274,11 +274,11 @@  discard block
 block discarded – undo
274 274
                 }
275 275
                 break;
276 276
             } else {
277
-                $this->logger->notice('No image file found for page "' . $page . '" in fileGrp "' . $fileGrpImages . '"');
277
+                $this->logger->notice('No image file found for page "'.$page.'" in fileGrp "'.$fileGrpImages.'"');
278 278
             }
279 279
         }
280 280
         if (empty($image)) {
281
-            $this->logger->warning('No image file found for page "' . $page . '" in fileGrps "' . $this->settings['fileGrpImages'] . '"');
281
+            $this->logger->warning('No image file found for page "'.$page.'" in fileGrps "'.$this->settings['fileGrpImages'].'"');
282 282
         }
283 283
         return $image;
284 284
     }
Please login to merge, or discard this patch.
Tests/Unit/Common/HelperTest.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,10 +5,8 @@
 block discarded – undo
5 5
 use Kitodo\Dlf\Common\Helper;
6 6
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
7 7
 
8
-class HelperTest extends UnitTestCase
9
-{
10
-    public function assertInvalidXml($xml)
11
-    {
8
+class HelperTest extends UnitTestCase {
9
+    public function assertInvalidXml($xml) {
12 10
         $result = Helper::getXmlFileAsString($xml);
13 11
         $this->assertEquals(false, $result);
14 12
     }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
     public function assertInvalidXml($xml)
11 11
     {
12 12
         $result = Helper::getXmlFileAsString($xml);
13
-        $this->assertEquals(false, $result);
13
+        $this->assertEquals(FALSE, $result);
14 14
     }
15 15
 
16 16
     /**
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
      */
20 20
     public function invalidXmlYieldsFalse(): void
21 21
     {
22
-        $this->assertInvalidXml(false);
23
-        $this->assertInvalidXml(null);
22
+        $this->assertInvalidXml(FALSE);
23
+        $this->assertInvalidXml(NULL);
24 24
         $this->assertInvalidXml(1);
25 25
         $this->assertInvalidXml([]);
26 26
         $this->assertInvalidXml(new \stdClass());
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 <root>
41 41
     <single />
42 42
 </root>
43
-XML;
43
+xml;
44 44
         $node = Helper::getXmlFileAsString($xml);
45 45
         $this->assertIsObject($node);
46 46
         $this->assertEquals('root', $node->getName());
Please login to merge, or discard this patch.
Tests/routeFunctionalInstance.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,10 +15,10 @@
 block discarded – undo
15 15
 preg_match("@.*/(?:acceptance|functional-[a-z0-9]+)@", $_SERVER['REQUEST_URI'], $matches);
16 16
 
17 17
 if (!empty($matches)) {
18
-    $root = realpath($_SERVER['DOCUMENT_ROOT'] . $matches[0]);
18
+    $root = realpath($_SERVER['DOCUMENT_ROOT'].$matches[0]);
19 19
     if ($root !== false) {
20
-        putenv('TYPO3_PATH_ROOT=' . $root);
21
-        putenv('TYPO3_PATH_APP=' . $root);
20
+        putenv('TYPO3_PATH_ROOT='.$root);
21
+        putenv('TYPO3_PATH_APP='.$root);
22 22
     }
23 23
 }
24 24
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,10 +16,10 @@
 block discarded – undo
16 16
 
17 17
 if (!empty($matches)) {
18 18
     $root = realpath($_SERVER['DOCUMENT_ROOT'] . $matches[0]);
19
-    if ($root !== false) {
19
+    if ($root !== FALSE) {
20 20
         putenv('TYPO3_PATH_ROOT=' . $root);
21 21
         putenv('TYPO3_PATH_APP=' . $root);
22 22
     }
23 23
 }
24 24
 
25
-return false;
25
+return FALSE;
Please login to merge, or discard this patch.
Tests/Functional/FunctionalTestCase.php 3 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $this->configurationToUseInTestInstance['EXTENSIONS']['dlf'] = $this->getDlfConfiguration();
71 71
 
72 72
         if ($this->disableJsonWrappedResponse) {
73
-            $this->frameworkExtensionsToLoad = array_filter($this->frameworkExtensionsToLoad, function ($ext) {
73
+            $this->frameworkExtensionsToLoad = array_filter($this->frameworkExtensionsToLoad, function($ext) {
74 74
                 return $ext !== 'Resources/Core/Functional/Extensions/json_response';
75 75
             });
76 76
         }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
         $this->objectManager = GeneralUtility::makeInstance(ObjectManager::class);
84 84
 
85
-        $this->baseUrl = 'http://web:8000/public/typo3temp/var/tests/functional-' . $this->identifier . '/';
85
+        $this->baseUrl = 'http://web:8000/public/typo3temp/var/tests/functional-'.$this->identifier.'/';
86 86
         $this->httpClient = new HttpClient([
87 87
             'base_uri' => $this->baseUrl,
88 88
             'http_errors' => false,
@@ -126,13 +126,13 @@  discard block
 block discarded – undo
126 126
 
127 127
     protected function addSiteConfig($identifier, $baseUrl)
128 128
     {
129
-        $siteConfig = Yaml::parseFile(__DIR__ . '/../Fixtures/siteconfig.yaml');
129
+        $siteConfig = Yaml::parseFile(__DIR__.'/../Fixtures/siteconfig.yaml');
130 130
         $siteConfig['base'] = $baseUrl;
131 131
         $siteConfig['languages'][0]['base'] = $baseUrl;
132 132
 
133
-        $siteConfigPath = $this->instancePath . '/typo3conf/sites/' . $identifier;
133
+        $siteConfigPath = $this->instancePath.'/typo3conf/sites/'.$identifier;
134 134
         @mkdir($siteConfigPath, 0775, true);
135
-        file_put_contents($siteConfigPath . '/config.yaml', Yaml::dump($siteConfig));
135
+        file_put_contents($siteConfigPath.'/config.yaml', Yaml::dump($siteConfig));
136 136
     }
137 137
 
138 138
     protected function initializeRepository(string $className, int $storagePid)
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      *
49 49
      * @var bool
50 50
      */
51
-    protected $disableJsonWrappedResponse = false;
51
+    protected $disableJsonWrappedResponse = FALSE;
52 52
 
53 53
     /** @var ObjectManager */
54 54
     protected $objectManager;
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         $this->baseUrl = 'http://web:8000/public/typo3temp/var/tests/functional-' . $this->identifier . '/';
86 86
         $this->httpClient = new HttpClient([
87 87
             'base_uri' => $this->baseUrl,
88
-            'http_errors' => false,
88
+            'http_errors' => FALSE,
89 89
         ]);
90 90
 
91 91
         $this->addSiteConfig('dlf-testing', $this->baseUrl);
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         $siteConfig['languages'][0]['base'] = $baseUrl;
132 132
 
133 133
         $siteConfigPath = $this->instancePath . '/typo3conf/sites/' . $identifier;
134
-        @mkdir($siteConfigPath, 0775, true);
134
+        @mkdir($siteConfigPath, 0775, TRUE);
135 135
         file_put_contents($siteConfigPath . '/config.yaml', Yaml::dump($siteConfig));
136 136
     }
137 137
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -63,8 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     protected $httpClient;
65 65
 
66
-    public function __construct()
67
-    {
66
+    public function __construct() {
68 67
         parent::__construct();
69 68
 
70 69
         $this->configurationToUseInTestInstance['EXTENSIONS']['dlf'] = $this->getDlfConfiguration();
@@ -91,8 +90,7 @@  discard block
 block discarded – undo
91 90
         $this->addSiteConfig('dlf-testing', $this->baseUrl);
92 91
     }
93 92
 
94
-    protected function getDlfConfiguration()
95
-    {
93
+    protected function getDlfConfiguration() {
96 94
         return [
97 95
             'solrFieldAutocomplete' => 'autocomplete',
98 96
             'solrFieldCollection' => 'collection',
@@ -124,8 +122,7 @@  discard block
 block discarded – undo
124 122
         ];
125 123
     }
126 124
 
127
-    protected function addSiteConfig($identifier, $baseUrl)
128
-    {
125
+    protected function addSiteConfig($identifier, $baseUrl) {
129 126
         $siteConfig = Yaml::parseFile(__DIR__ . '/../Fixtures/siteconfig.yaml');
130 127
         $siteConfig['base'] = $baseUrl;
131 128
         $siteConfig['languages'][0]['base'] = $baseUrl;
@@ -135,8 +132,7 @@  discard block
 block discarded – undo
135 132
         file_put_contents($siteConfigPath . '/config.yaml', Yaml::dump($siteConfig));
136 133
     }
137 134
 
138
-    protected function initializeRepository(string $className, int $storagePid)
139
-    {
135
+    protected function initializeRepository(string $className, int $storagePid) {
140 136
         $repository = $this->objectManager->get($className);
141 137
 
142 138
         $querySettings = $this->objectManager->get(Typo3QuerySettings::class);
Please login to merge, or discard this patch.
Tests/Functional/Api/PageViewProxyTest.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
         ]);
78 78
 
79 79
         $this->assertEquals(200, $response->getStatusCode());
80
-        $this->assertEquals('This is some plain text test file.' . "\n", (string) $response->getBody());
80
+        $this->assertEquals('This is some plain text test file.'."\n", (string) $response->getBody());
81 81
     }
82 82
 
83 83
     /**
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,19 +6,16 @@
 block discarded – undo
6 6
 use Kitodo\Dlf\Tests\Functional\FunctionalTestCase;
7 7
 use TYPO3\CMS\Core\Utility\GeneralUtility;
8 8
 
9
-class PageViewProxyTest extends FunctionalTestCase
10
-{
9
+class PageViewProxyTest extends FunctionalTestCase {
11 10
     protected $disableJsonWrappedResponse = true;
12 11
 
13
-    protected function getDlfConfiguration()
14
-    {
12
+    protected function getDlfConfiguration() {
15 13
         return array_merge(parent::getDlfConfiguration(), [
16 14
             'enableInternalProxy' => true,
17 15
         ]);
18 16
     }
19 17
 
20
-    protected function queryProxy(array $query, string $method = 'GET')
21
-    {
18
+    protected function queryProxy(array $query, string $method = 'GET') {
22 19
         $query['eID'] = 'tx_dlf_pageview_proxy';
23 20
 
24 21
         return $this->httpClient->request($method, '', [
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,12 +8,12 @@
 block discarded – undo
8 8
 
9 9
 class PageViewProxyTest extends FunctionalTestCase
10 10
 {
11
-    protected $disableJsonWrappedResponse = true;
11
+    protected $disableJsonWrappedResponse = TRUE;
12 12
 
13 13
     protected function getDlfConfiguration()
14 14
     {
15 15
         return array_merge(parent::getDlfConfiguration(), [
16
-            'enableInternalProxy' => true,
16
+            'enableInternalProxy' => TRUE,
17 17
         ]);
18 18
     }
19 19
 
Please login to merge, or discard this patch.
Tests/Functional/Api/PageViewProxyDisabledTest.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,12 +5,10 @@
 block discarded – undo
5 5
 use Kitodo\Dlf\Tests\Functional\FunctionalTestCase;
6 6
 use TYPO3\CMS\Core\Utility\GeneralUtility;
7 7
 
8
-class PageViewProxyDisabledTest extends FunctionalTestCase
9
-{
8
+class PageViewProxyDisabledTest extends FunctionalTestCase {
10 9
     protected $disableJsonWrappedResponse = true;
11 10
 
12
-    protected function queryProxy(array $query, string $method = 'GET')
13
-    {
11
+    protected function queryProxy(array $query, string $method = 'GET') {
14 12
         $query['eID'] = 'tx_dlf_pageview_proxy';
15 13
 
16 14
         return $this->httpClient->request($method, '', [
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 
8 8
 class PageViewProxyDisabledTest extends FunctionalTestCase
9 9
 {
10
-    protected $disableJsonWrappedResponse = true;
10
+    protected $disableJsonWrappedResponse = TRUE;
11 11
 
12 12
     protected function queryProxy(array $query, string $method = 'GET')
13 13
     {
Please login to merge, or discard this patch.