@@ -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"); |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | public function validate(mixed $value): Result |
| 55 | 55 | { |
| 56 | 56 | if (!$value instanceof $this->valueClassName) { |
| 57 | - $this->logger->debug('Value must be an instance of ' . $this->valueClassName . '.'); |
|
| 57 | + $this->logger->debug('Value must be an instance of '.$this->valueClassName.'.'); |
|
| 58 | 58 | throw new InvalidArgumentException('Type of value is not valid.', 1723126505626); |
| 59 | 59 | } |
| 60 | 60 | return parent::validate($value); |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | { |
| 55 | 55 | foreach ($configuration as $configurationItem) { |
| 56 | 56 | if (!class_exists($configurationItem["className"])) { |
| 57 | - $this->logger->error('Unable to load class ' . $configurationItem["className"] . '.'); |
|
| 57 | + $this->logger->error('Unable to load class '.$configurationItem["className"].'.'); |
|
| 58 | 58 | throw new InvalidArgumentException('Unable to load validator class.', 1723200537037); |
| 59 | 59 | } |
| 60 | 60 | $breakOnError = !isset($configurationItem["breakOnError"]) || $configurationItem["breakOnError"] !== "false"; |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | if (!$validator instanceof AbstractDlfValidator) { |
| 86 | - $this->logger->error($className . ' must be an instance of AbstractDlfValidator.'); |
|
| 86 | + $this->logger->error($className.' must be an instance of AbstractDlfValidator.'); |
|
| 87 | 87 | throw new InvalidArgumentException('Class must be an instance of AbstractDlfValidator.', 1723121212747); |
| 88 | 88 | } |
| 89 | 89 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | protected function isValid(mixed $value): void |
| 105 | 105 | { |
| 106 | 106 | if (!$value instanceof $this->valueClassName) { |
| 107 | - $this->logger->error('Value must be an instance of ' . $this->valueClassName . '.'); |
|
| 107 | + $this->logger->error('Value must be an instance of '.$this->valueClassName.'.'); |
|
| 108 | 108 | throw new InvalidArgumentException('Type of value is not valid.', 1723127564821); |
| 109 | 109 | } |
| 110 | 110 | |