@@ -22,10 +22,8 @@ |
||
22 | 22 | * |
23 | 23 | * @access public |
24 | 24 | */ |
25 | -class DOMDocumentValidationStack extends AbstractDlfValidationStack |
|
26 | -{ |
|
27 | - public function __construct(array $configuration) |
|
28 | - { |
|
25 | +class DOMDocumentValidationStack extends AbstractDlfValidationStack { |
|
26 | + public function __construct(array $configuration) { |
|
29 | 27 | parent::__construct(\DOMDocument::class); |
30 | 28 | $this->addValidators($configuration); |
31 | 29 | } |
@@ -14,8 +14,7 @@ |
||
14 | 14 | * LICENSE.txt file that was distributed with this source code. |
15 | 15 | */ |
16 | 16 | |
17 | -trait LibXmlTrait |
|
18 | -{ |
|
17 | +trait LibXmlTrait { |
|
19 | 18 | /** |
20 | 19 | * Add the errors from the libxml error buffer as validation error. |
21 | 20 | * |
@@ -26,8 +26,7 @@ discard block |
||
26 | 26 | * |
27 | 27 | * @access public |
28 | 28 | */ |
29 | -abstract class AbstractDlfValidationStack extends AbstractDlfValidator |
|
30 | -{ |
|
29 | +abstract class AbstractDlfValidationStack extends AbstractDlfValidator { |
|
31 | 30 | use LoggerAwareTrait; |
32 | 31 | |
33 | 32 | const ITEM_KEY_TITLE = "title"; |
@@ -36,8 +35,7 @@ discard block |
||
36 | 35 | |
37 | 36 | protected array $validatorStack = []; |
38 | 37 | |
39 | - public function __construct(string $valueClassName) |
|
40 | - { |
|
38 | + public function __construct(string $valueClassName) { |
|
41 | 39 | parent::__construct($valueClassName); |
42 | 40 | } |
43 | 41 |
@@ -33,8 +33,7 @@ |
||
33 | 33 | * @subpackage dlf |
34 | 34 | * @access public |
35 | 35 | */ |
36 | -class DOMDocumentValidation implements MiddlewareInterface |
|
37 | -{ |
|
36 | +class DOMDocumentValidation implements MiddlewareInterface { |
|
38 | 37 | use LoggerAwareTrait; |
39 | 38 | |
40 | 39 | /** |
@@ -28,8 +28,7 @@ |
||
28 | 28 | * |
29 | 29 | * @access public |
30 | 30 | */ |
31 | -class SaxonXslToSvrlValidatorTest extends UnitTestCase |
|
32 | -{ |
|
31 | +class SaxonXslToSvrlValidatorTest extends UnitTestCase { |
|
33 | 32 | const SVRL = <<<SVRL |
34 | 33 | <svrl:schematron-output |
35 | 34 | xmlns:svrl="http://purl.oclc.org/dsdl/schematron"> |
@@ -29,8 +29,7 @@ |
||
29 | 29 | * |
30 | 30 | * @access public |
31 | 31 | */ |
32 | -class DOMDocumentValidationStackTest extends UnitTestCase |
|
33 | -{ |
|
32 | +class DOMDocumentValidationStackTest extends UnitTestCase { |
|
34 | 33 | public function setUp(): void |
35 | 34 | { |
36 | 35 | parent::setUp(); |
@@ -26,8 +26,7 @@ |
||
26 | 26 | * |
27 | 27 | * @access public |
28 | 28 | */ |
29 | -class XmlSchemesValidatorTest extends UnitTestCase |
|
30 | -{ |
|
29 | +class XmlSchemesValidatorTest extends UnitTestCase { |
|
31 | 30 | const METS = <<<METS |
32 | 31 | <mets:mets |
33 | 32 | xmlns:mets="http://www.loc.gov/METS/" |
@@ -30,14 +30,12 @@ |
||
30 | 30 | * |
31 | 31 | * @access public |
32 | 32 | */ |
33 | -class SaxonXslToSvrlValidator extends AbstractDlfValidator implements LoggerAwareInterface |
|
34 | -{ |
|
33 | +class SaxonXslToSvrlValidator extends AbstractDlfValidator implements LoggerAwareInterface { |
|
35 | 34 | private string $jar; |
36 | 35 | |
37 | 36 | private string $xsl; |
38 | 37 | |
39 | - public function __construct(array $configuration) |
|
40 | - { |
|
38 | + public function __construct(array $configuration) { |
|
41 | 39 | parent::__construct(DOMDocument::class); |
42 | 40 | $this->jar = GeneralUtility::getFileAbsFileName($configuration["jar"] ?? ''); |
43 | 41 | $this->xsl = GeneralUtility::getFileAbsFileName($configuration["xsl"] ?? ''); |
@@ -24,14 +24,12 @@ |
||
24 | 24 | * |
25 | 25 | * @access public |
26 | 26 | */ |
27 | -class XmlSchemesValidator extends AbstractDlfValidator |
|
28 | -{ |
|
27 | +class XmlSchemesValidator extends AbstractDlfValidator { |
|
29 | 28 | use LibXmlTrait; |
30 | 29 | |
31 | 30 | private array $schemes; |
32 | 31 | |
33 | - public function __construct(array $configuration) |
|
34 | - { |
|
32 | + public function __construct(array $configuration) { |
|
35 | 33 | parent::__construct(DOMDocument::class); |
36 | 34 | $this->schemes = $configuration; |
37 | 35 | } |