Passed
Pull Request — master (#123)
by
unknown
07:53 queued 02:59
created
Tests/Functional/Common/SolrSearchQueryTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,13 +23,13 @@
 block discarded – undo
23 23
     private $solrCoreRepository;
24 24
 
25 25
     private static array $databaseFixtures = [
26
-        __DIR__ . '/../../Fixtures/Common/documents_1.csv',
27
-        __DIR__ . '/../../Fixtures/Common/pages.csv',
28
-        __DIR__ . '/../../Fixtures/Common/solrcores.csv'
26
+        __DIR__.'/../../Fixtures/Common/documents_1.csv',
27
+        __DIR__.'/../../Fixtures/Common/pages.csv',
28
+        __DIR__.'/../../Fixtures/Common/solrcores.csv'
29 29
     ];
30 30
 
31 31
     private static array $solrFixtures = [
32
-        __DIR__ . '/../../Fixtures/Common/documents_1.solr.json'
32
+        __DIR__.'/../../Fixtures/Common/documents_1.solr.json'
33 33
     ];
34 34
 
35 35
     public function setUp(): void
Please login to merge, or discard this patch.
Tests/Functional/Common/SolrTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,13 +21,13 @@
 block discarded – undo
21 21
 {
22 22
 
23 23
     private static array $databaseFixtures = [
24
-        __DIR__ . '/../../Fixtures/Common/documents_1.csv',
25
-        __DIR__ . '/../../Fixtures/Common/pages.csv',
26
-        __DIR__ . '/../../Fixtures/Common/solrcores.csv'
24
+        __DIR__.'/../../Fixtures/Common/documents_1.csv',
25
+        __DIR__.'/../../Fixtures/Common/pages.csv',
26
+        __DIR__.'/../../Fixtures/Common/solrcores.csv'
27 27
     ];
28 28
 
29 29
     private static array $solrFixtures = [
30
-        __DIR__ . '/../../Fixtures/Common/documents_1.solr.json'
30
+        __DIR__.'/../../Fixtures/Common/documents_1.solr.json'
31 31
     ];
32 32
 
33 33
     /**
Please login to merge, or discard this patch.
Tests/Functional/FunctionalTestCase.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $this->configurationToUseInTestInstance['EXTENSIONS']['dlf'] = $this->getDlfConfiguration();
99 99
 
100 100
         if ($this->disableJsonWrappedResponse) {
101
-            $this->frameworkExtensionsToLoad = array_filter($this->frameworkExtensionsToLoad, function ($ext) {
101
+            $this->frameworkExtensionsToLoad = array_filter($this->frameworkExtensionsToLoad, function($ext) {
102 102
                 return $ext !== 'Resources/Core/Functional/Extensions/json_response';
103 103
             });
104 104
         }
@@ -111,9 +111,9 @@  discard block
 block discarded – undo
111 111
         $this->objectManager = GeneralUtility::makeInstance(ObjectManager::class);
112 112
         $this->persistenceManager = GeneralUtility::makeInstance(PersistenceManager::class);
113 113
 
114
-        $this->baseUrl = 'http://web:8000/public/typo3temp/var/tests/functional-' . $this->identifier . '/';
114
+        $this->baseUrl = 'http://web:8000/public/typo3temp/var/tests/functional-'.$this->identifier.'/';
115 115
         $this->httpClient = new HttpClient([
116
-            'base_uri' => $this->baseUrl . 'index.php',
116
+            'base_uri' => $this->baseUrl.'index.php',
117 117
             'http_errors' => false,
118 118
         ]);
119 119
 
@@ -164,13 +164,13 @@  discard block
 block discarded – undo
164 164
 
165 165
     protected function addSiteConfig($identifier)
166 166
     {
167
-        $siteConfig = Yaml::parseFile(__DIR__ . '/../Fixtures/siteconfig.yaml');
167
+        $siteConfig = Yaml::parseFile(__DIR__.'/../Fixtures/siteconfig.yaml');
168 168
         $siteConfig['base'] = $this->baseUrl;
169 169
         $siteConfig['languages'][0]['base'] = $this->baseUrl;
170 170
 
171
-        $siteConfigPath = $this->instancePath . '/typo3conf/sites/' . $identifier;
171
+        $siteConfigPath = $this->instancePath.'/typo3conf/sites/'.$identifier;
172 172
         @mkdir($siteConfigPath, 0775, true);
173
-        file_put_contents($siteConfigPath . '/config.yaml', Yaml::dump($siteConfig));
173
+        file_put_contents($siteConfigPath.'/config.yaml', Yaml::dump($siteConfig));
174 174
     }
175 175
 
176 176
     protected function initializeRepository(string $className, int $storagePid)
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
         $jsonDocuments = json_decode(file_get_contents($path), true);
190 190
 
191 191
         $updateQuery = $solr->service->createUpdate();
192
-        $documents = array_map(function ($jsonDoc) use ($updateQuery) {
192
+        $documents = array_map(function($jsonDoc) use ($updateQuery) {
193 193
             $document = $updateQuery->createDocument();
194 194
             foreach ($jsonDoc as $key => $value) {
195 195
                 $document->setField($key, $value);
Please login to merge, or discard this patch.
Classes/Controller/ToolboxController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
                         $this->renderToolByName('renderSearchInDocumentTool');
100 100
                         break;
101 101
                     default:
102
-                        $this->logger->warning('Incorrect tool configuration: "' . $this->settings['tools'] . '". Tool "' . $tool . '" does not exist.');
102
+                        $this->logger->warning('Incorrect tool configuration: "'.$this->settings['tools'].'". Tool "'.$tool.'" does not exist.');
103 103
                 }
104 104
             }
105 105
         }
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
                 }
263 263
                 break;
264 264
             } else {
265
-                $this->logger->warning('File not found in fileGrp "' . $fileGrp . '"');
265
+                $this->logger->warning('File not found in fileGrp "'.$fileGrp.'"');
266 266
             }
267 267
         }
268 268
         return $image;
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
             empty($firstPageLink)
347 347
             && empty($secondPageLink)
348 348
         ) {
349
-            $this->logger->warning('File not found in fileGrps "' . $this->extConf['files']['fileGrpDownload'] . '"');
349
+            $this->logger->warning('File not found in fileGrps "'.$this->extConf['files']['fileGrpDownload'].'"');
350 350
         }
351 351
 
352 352
         if (!empty($firstPageLink)) {
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
             }
385 385
         }
386 386
         if (empty($workLink)) {
387
-            $this->logger->warning('File not found in fileGrps "' . $this->extConf['files']['fileGrpDownload'] . '"');
387
+            $this->logger->warning('File not found in fileGrps "'.$this->extConf['files']['fileGrpDownload'].'"');
388 388
         }
389 389
         return $workLink;
390 390
     }
Please login to merge, or discard this patch.
Classes/Controller/PageViewController.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -119,11 +119,11 @@  discard block
 block discarded – undo
119 119
                 $fulltext['mimetype'] = $file['mimeType'];
120 120
                 break;
121 121
             } else {
122
-                $this->logger->notice('No full-text file found for page "' . $page . '" in fileGrp "' . $fileGrpFulltext . '"');
122
+                $this->logger->notice('No full-text file found for page "'.$page.'" in fileGrp "'.$fileGrpFulltext.'"');
123 123
             }
124 124
         }
125 125
         if (empty($fulltext)) {
126
-            $this->logger->notice('No full-text file found for page "' . $page . '" in fileGrps "' . $this->extConf['files']['fileGrpFulltext'] . '"');
126
+            $this->logger->notice('No full-text file found for page "'.$page.'" in fileGrps "'.$this->extConf['files']['fileGrpFulltext'].'"');
127 127
         }
128 128
         return $fulltext;
129 129
     }
@@ -141,13 +141,13 @@  discard block
 block discarded – undo
141 141
         $viewerConfiguration = '$(document).ready(function() {
142 142
                 if (dlfUtils.exists(dlfViewer)) {
143 143
                     tx_dlf_viewer = new dlfViewer({
144
-                        controls: ["' . implode('", "', $this->controls) . '"],
145
-                        div: "' . $this->settings['elementId'] . '",
146
-                        progressElementId: "' . $this->settings['progressElementId'] . '",
147
-                        images: ' . json_encode($this->images) . ',
148
-                        fulltexts: ' . json_encode($this->fulltexts) . ',
149
-                        annotationContainers: ' . json_encode($this->annotationContainers) . ',
150
-                        useInternalProxy: ' . ($this->settings['useInternalProxy'] ? 1 : 0) . '
144
+                        controls: ["' . implode('", "', $this->controls).'"],
145
+                        div: "' . $this->settings['elementId'].'",
146
+                        progressElementId: "' . $this->settings['progressElementId'].'",
147
+                        images: ' . json_encode($this->images).',
148
+                        fulltexts: ' . json_encode($this->fulltexts).',
149
+                        annotationContainers: ' . json_encode($this->annotationContainers).',
150
+                        useInternalProxy: ' . ($this->settings['useInternalProxy'] ? 1 : 0).'
151 151
                     });
152 152
                 }
153 153
             });';
@@ -240,11 +240,11 @@  discard block
 block discarded – undo
240 240
                 }
241 241
                 break;
242 242
             } else {
243
-                $this->logger->notice('No image file found for page "' . $page . '" in fileGrp "' . $fileGrpImages . '"');
243
+                $this->logger->notice('No image file found for page "'.$page.'" in fileGrp "'.$fileGrpImages.'"');
244 244
             }
245 245
         }
246 246
         if (empty($image)) {
247
-            $this->logger->warning('No image file found for page "' . $page . '" in fileGrps "' . $this->extConf['files']['fileGrpImages'] . '"');
247
+            $this->logger->warning('No image file found for page "'.$page.'" in fileGrps "'.$this->extConf['files']['fileGrpImages'].'"');
248 248
         }
249 249
         return $image;
250 250
     }
Please login to merge, or discard this patch.
Tests/Functional/Common/MetsDocumentTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,14 +21,14 @@
 block discarded – undo
21 21
     {
22 22
         parent::setUp();
23 23
 
24
-        $this->importCSVDataSet(__DIR__ . '/../../Fixtures/Common/documents_1.csv');
25
-        $this->importCSVDataSet(__DIR__ . '/../../Fixtures/Common/metadata.csv');
26
-        $this->importCSVDataSet(__DIR__ . '/../../Fixtures/MetsDocument/metadata_mets.csv');
24
+        $this->importCSVDataSet(__DIR__.'/../../Fixtures/Common/documents_1.csv');
25
+        $this->importCSVDataSet(__DIR__.'/../../Fixtures/Common/metadata.csv');
26
+        $this->importCSVDataSet(__DIR__.'/../../Fixtures/MetsDocument/metadata_mets.csv');
27 27
     }
28 28
 
29 29
     protected function doc(string $file)
30 30
     {
31
-        $url = 'http://web:8001/Tests/Fixtures/MetsDocument/' . $file;
31
+        $url = 'http://web:8001/Tests/Fixtures/MetsDocument/'.$file;
32 32
         $doc = AbstractDocument::getInstance($url, ['general' => ['useExternalApisForMetadata' => 0]]);
33 33
         self::assertNotNull($doc);
34 34
         return $doc;
Please login to merge, or discard this patch.
Classes/Format/Mods.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         if (!empty($name)) {
125 125
             $this->metadata['author'][$i] = [
126 126
                 'name' => $name,
127
-                'url' => 'https://orcid.org/' . $orcidId
127
+                'url' => 'https://orcid.org/'.$orcidId
128 128
             ];
129 129
         } else {
130 130
             //fallback into display form
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         }
182 182
         // Append "valueURI" to name using Unicode unit separator.
183 183
         if (!empty($authors[$i]->getValueURI())) {
184
-            $this->metadata['author'][$i] .= pack('C', 31) . $authors[$i]->getValueURI();
184
+            $this->metadata['author'][$i] .= pack('C', 31).$authors[$i]->getValueURI();
185 185
         }
186 186
     }
187 187
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
         if (!empty($name)) {
245 245
             $this->metadata['holder'][$i] = [
246 246
                 'name' => $name,
247
-                'url' => 'http://viaf.org/viaf/' . $viafId
247
+                'url' => 'http://viaf.org/viaf/'.$viafId
248 248
             ];
249 249
         } else {
250 250
             //fallback into display form
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
         $this->getHolderFromXmlDisplayForm($holders, $i);
268 268
         // Append "valueURI" to name using Unicode unit separator.
269 269
         if (!empty($holders[$i]->getValueURI())) {
270
-            $this->metadata['holder'][$i] .= pack('C', 31) . $holders[$i]->getValueURI();
270
+            $this->metadata['holder'][$i] .= pack('C', 31).$holders[$i]->getValueURI();
271 271
         }
272 272
     }
273 273
 
Please login to merge, or discard this patch.
Classes/Validation/DocumentValidator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     {
83 83
         foreach ($this->requiredMetadataFields as $requiredMetadataField) {
84 84
             if (empty($this->metadata[$requiredMetadataField][0])) {
85
-                $this->logger->error('Missing required metadata field "' . $requiredMetadataField . '".');
85
+                $this->logger->error('Missing required metadata field "'.$requiredMetadataField.'".');
86 86
                 return false;
87 87
             }
88 88
         }
@@ -100,14 +100,14 @@  discard block
 block discarded – undo
100 100
      */
101 101
     public function hasCorrectLogicalStructure(string $type): bool
102 102
     {
103
-        $expectedNodes = $this->xml->xpath('./mets:structMap[@TYPE="LOGICAL"]/mets:div[@TYPE="' . $type . '"]');
103
+        $expectedNodes = $this->xml->xpath('./mets:structMap[@TYPE="LOGICAL"]/mets:div[@TYPE="'.$type.'"]');
104 104
         if ($expectedNodes) {
105 105
             return true;
106 106
         }
107 107
 
108 108
         $existingNodes = $this->xml->xpath('./mets:structMap[@TYPE="LOGICAL"]/mets:div');
109 109
         if ($existingNodes) {
110
-            $this->logger->error('Document contains logical structure but @TYPE="' . $type . '" is missing.');
110
+            $this->logger->error('Document contains logical structure but @TYPE="'.$type.'" is missing.');
111 111
             return false;
112 112
         }
113 113
 
Please login to merge, or discard this patch.
Tests/Unit/Validation/DocumentValidatorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
 
106 106
     private function getXml(string $file): SimpleXMLElement
107 107
     {
108
-        $xml = simplexml_load_file(__DIR__ . '/../../Fixtures/MetsDocument/' . $file);
108
+        $xml = simplexml_load_file(__DIR__.'/../../Fixtures/MetsDocument/'.$file);
109 109
         self::assertNotFalse($xml);
110 110
         return $xml;
111 111
     }
Please login to merge, or discard this patch.