@@ -61,11 +61,11 @@ |
||
61 | 61 | protected function process(mixed $value): string |
62 | 62 | { |
63 | 63 | // using source from standard input |
64 | - $process = new Process(['java', '-jar', $this->jar, '-xsl:' . $this->xsl, '-s:-'], null, null, $value->saveXML()); |
|
64 | + $process = new Process(['java', '-jar', $this->jar, '-xsl:'.$this->xsl, '-s:-'], null, null, $value->saveXML()); |
|
65 | 65 | $process->run(); |
66 | 66 | // executes after the command finish |
67 | 67 | if (!$process->isSuccessful()) { |
68 | - $this->logger->error('Processing exits with code "' . $process->getExitCode() . '"'); |
|
68 | + $this->logger->error('Processing exits with code "'.$process->getExitCode().'"'); |
|
69 | 69 | throw new InvalidArgumentException('Processing was not successful.', 1724862680); |
70 | 70 | } |
71 | 71 | return $process->getOutput(); |
@@ -78,19 +78,19 @@ |
||
78 | 78 | $validation = GeneralUtility::makeInstance(DOMDocumentValidationStack::class, $settings['domDocumentValidationValidators']); |
79 | 79 | |
80 | 80 | if (!GeneralUtility::isValidUrl($urlParam)) { |
81 | - $this->logger->debug('Parameter "' . $urlParam . '" is not a valid url.'); |
|
81 | + $this->logger->debug('Parameter "'.$urlParam.'" is not a valid url.'); |
|
82 | 82 | throw new InvalidArgumentException('Value of url parameter is not a valid url.', 1724852611); |
83 | 83 | } |
84 | 84 | |
85 | 85 | $content = GeneralUtility::getUrl($urlParam); |
86 | 86 | if ($content === false) { |
87 | - $this->logger->debug('Error while loading content of "' . $urlParam . '"'); |
|
87 | + $this->logger->debug('Error while loading content of "'.$urlParam.'"'); |
|
88 | 88 | throw new InvalidArgumentException('Error while loading content of url.', 1724420640); |
89 | 89 | } |
90 | 90 | |
91 | 91 | $document = new DOMDocument(); |
92 | 92 | if ($document->loadXML($content) === false) { |
93 | - $this->logger->debug('Error converting content of "' . $urlParam . '" to xml.'); |
|
93 | + $this->logger->debug('Error converting content of "'.$urlParam.'" to xml.'); |
|
94 | 94 | throw new InvalidArgumentException('Error converting content to xml.', 1724420648); |
95 | 95 | } |
96 | 96 |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | { |
49 | 49 | parent::setUp(); |
50 | 50 | $this->resetSingletonInstances = true; |
51 | - $this->dlfExtensionPath = Environment::getExtensionsPath() . 'dlf'; |
|
51 | + $this->dlfExtensionPath = Environment::getExtensionsPath().'dlf'; |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | public function testJarFileNotFound(): void |
@@ -63,12 +63,12 @@ discard block |
||
63 | 63 | $this->expectException(InvalidArgumentException::class); |
64 | 64 | $this->expectExceptionMessage("XSL Schematron file not found."); |
65 | 65 | // It only checks if a file exists at the specified path, so we can use one of the test files. |
66 | - new SaxonXslToSvrlValidator(["jar" => $this->dlfExtensionPath . '/Tests/Fixtures/Format/alto.xml']); |
|
66 | + new SaxonXslToSvrlValidator(["jar" => $this->dlfExtensionPath.'/Tests/Fixtures/Format/alto.xml']); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | public function testValidation(): void |
70 | 70 | { |
71 | - $saxonXslToSvrlValidator = new SaxonXslToSvrlValidator(["jar" => $this->dlfExtensionPath . '/Tests/Fixtures/Format/alto.xml', "xsl" => $this->dlfExtensionPath . '/Tests/Fixtures/Format/alto.xml']); |
|
71 | + $saxonXslToSvrlValidator = new SaxonXslToSvrlValidator(["jar" => $this->dlfExtensionPath.'/Tests/Fixtures/Format/alto.xml', "xsl" => $this->dlfExtensionPath.'/Tests/Fixtures/Format/alto.xml']); |
|
72 | 72 | $reflection = new ReflectionClass($saxonXslToSvrlValidator); |
73 | 73 | |
74 | 74 | $result = $reflection->getProperty("result"); |
@@ -164,11 +164,11 @@ discard block |
||
164 | 164 | if ($doc !== null) { |
165 | 165 | $this->document->setCurrentDocument($doc); |
166 | 166 | } else { |
167 | - $this->logger->error('Failed to load document with record ID "' . $this->requestData['recordId'] . '"'); |
|
167 | + $this->logger->error('Failed to load document with record ID "'.$this->requestData['recordId'].'"'); |
|
168 | 168 | } |
169 | 169 | } |
170 | 170 | } else { |
171 | - $this->logger->error('Invalid ID "' . $documentId . '" or PID "' . $this->settings['storagePid'] . '" for document loading'); |
|
171 | + $this->logger->error('Invalid ID "'.$documentId.'" or PID "'.$this->settings['storagePid'].'" for document loading'); |
|
172 | 172 | } |
173 | 173 | } |
174 | 174 | |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | && !MathUtility::canBeInterpretedAsInteger($this->requestData['id']) |
266 | 266 | && !GeneralUtility::isValidUrl($this->requestData['id']) |
267 | 267 | ) { |
268 | - $this->logger->warning('Invalid ID or URI "' . $this->requestData['id'] . '" for document loading'); |
|
268 | + $this->logger->warning('Invalid ID or URI "'.$this->requestData['id'].'" for document loading'); |
|
269 | 269 | unset($this->requestData['id']); |
270 | 270 | } |
271 | 271 | |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | { |
326 | 326 | if (!array_key_exists($setting, $this->settings) || empty($this->settings[$setting])) { |
327 | 327 | $this->settings[$setting] = $value; |
328 | - $this->logger->warning('Setting "' . $setting . '" not set, using default value "' . $value . '". Probably FlexForm for controller "' . get_class($this) . '" is not read.'); |
|
328 | + $this->logger->warning('Setting "'.$setting.'" not set, using default value "'.$value.'". Probably FlexForm for controller "'.get_class($this).'" is not read.'); |
|
329 | 329 | } else { |
330 | 330 | $this->settings[$setting] = (int) $this->settings[$setting]; |
331 | 331 | } |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | $pages = []; |
411 | 411 | $pagesSect = []; |
412 | 412 | $aRange = []; |
413 | - $nRange = 5; // ToDo: should be made configurable |
|
413 | + $nRange = 5; // ToDo: should be made configurable |
|
414 | 414 | |
415 | 415 | // lower limit of the range |
416 | 416 | $nBottom = $currentPageNumber - $nRange; |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | |
426 | 426 | // check whether the first screen page is > 1, if yes then points must be added |
427 | 427 | if ($aRange[0] > 1) { |
428 | - array_push($pagesSect, ['label' => '...','startRecordNumber' => '...']); |
|
428 | + array_push($pagesSect, ['label' => '...', 'startRecordNumber' => '...']); |
|
429 | 429 | }; |
430 | 430 | $lastStartRecordNumberGrid = 0; // due to validity outside the loop |
431 | 431 | foreach (range($firstPage, $lastPage) as $i) { |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | |
469 | 469 | // Check if screen page is in range |
470 | 470 | if (in_array($i, $aRange)) { |
471 | - array_push($pagesSect, ['label' => $i,'startRecordNumber' => $startRecordNumber]); |
|
471 | + array_push($pagesSect, ['label' => $i, 'startRecordNumber' => $startRecordNumber]); |
|
472 | 472 | }; |
473 | 473 | }; |
474 | 474 | }; |
@@ -534,7 +534,7 @@ discard block |
||
534 | 534 | // fix for count(): Argument #1 ($value) must be of type Countable|array, null given |
535 | 535 | $this->documentArray[] = $doc; |
536 | 536 | } else { |
537 | - $this->logger->error('Invalid UID "' . $documentId . '" or PID "' . $this->settings['storagePid'] . '" for document loading'); |
|
537 | + $this->logger->error('Invalid UID "'.$documentId.'" or PID "'.$this->settings['storagePid'].'" for document loading'); |
|
538 | 538 | } |
539 | 539 | |
540 | 540 | return $doc; |
@@ -572,7 +572,7 @@ discard block |
||
572 | 572 | foreach ($this->requestData['multipleSource'] as $location) { |
573 | 573 | $document = AbstractDocument::getInstance($location, $this->settings, true); |
574 | 574 | if ($document !== null) { |
575 | - $this->documentArray['extra_' . $i] = $document; |
|
575 | + $this->documentArray['extra_'.$i] = $document; |
|
576 | 576 | } |
577 | 577 | $i++; |
578 | 578 | } |
@@ -596,7 +596,7 @@ discard block |
||
596 | 596 | |
597 | 597 | $this->document->setLocation($documentId); |
598 | 598 | } else { |
599 | - $this->logger->error('Invalid location given "' . $documentId . '" for document loading'); |
|
599 | + $this->logger->error('Invalid location given "'.$documentId.'" for document loading'); |
|
600 | 600 | } |
601 | 601 | |
602 | 602 | return $doc; |