@@ -22,7 +22,7 @@ |
||
22 | 22 | /** |
23 | 23 | * @var XPathXMLGenerator |
24 | 24 | */ |
25 | - private $xpathGenerator = null; |
|
25 | + private $xpathGenerator = NULL; |
|
26 | 26 | |
27 | 27 | protected function setUp() { |
28 | 28 | $this->xpathGenerator = new \EWW\Dpf\Services\XPathXMLGenerator(); |
@@ -16,8 +16,7 @@ discard block |
||
16 | 16 | |
17 | 17 | use Nimut\TestingFramework\TestCase\UnitTestCase; |
18 | 18 | |
19 | -class XPathXMLGeneratorTest extends UnitTestCase |
|
20 | -{ |
|
19 | +class XPathXMLGeneratorTest extends UnitTestCase { |
|
21 | 20 | |
22 | 21 | /** |
23 | 22 | * @var XPathXMLGenerator |
@@ -31,8 +30,7 @@ discard block |
||
31 | 30 | /** |
32 | 31 | * @test |
33 | 32 | */ |
34 | - public function testComplexElementsWithAttributes() |
|
35 | - { |
|
33 | + public function testComplexElementsWithAttributes() { |
|
36 | 34 | $xpath = 'mods:name[mods:role/mods:roleTerm[@type="code"][@authority="marcrelator"]="edt"]/mods:displayForm'; |
37 | 35 | $expectedXml = '<mods:name><mods:role><mods:roleTerm type="code" authority="marcrelator">edt</mods:roleTerm></mods:role><mods:displayForm/></mods:name>'; |
38 | 36 | |
@@ -47,8 +45,7 @@ discard block |
||
47 | 45 | /** |
48 | 46 | * @test |
49 | 47 | */ |
50 | - public function testElementsWithMoreAttributes() |
|
51 | - { |
|
48 | + public function testElementsWithMoreAttributes() { |
|
52 | 49 | $xpath = 'mods:language/mods:languageTerm[@authority="iso639-2b"][@type="code"]="ger"'; |
53 | 50 | $expectedXml = '<mods:language><mods:languageTerm authority="iso639-2b" type="code">ger</mods:languageTerm></mods:language>'; |
54 | 51 | |
@@ -63,8 +60,7 @@ discard block |
||
63 | 60 | /** |
64 | 61 | * @test |
65 | 62 | */ |
66 | - public function testSimpleElementWithAttribute() |
|
67 | - { |
|
63 | + public function testSimpleElementWithAttribute() { |
|
68 | 64 | $xpath = 'mods:originInfo[@eventType="publication"]'; |
69 | 65 | $expectedXml = '<mods:originInfo eventType="publication"/>'; |
70 | 66 | |
@@ -79,8 +75,7 @@ discard block |
||
79 | 75 | /** |
80 | 76 | * @test |
81 | 77 | */ |
82 | - public function testValuesWithLinebreaks() |
|
83 | - { |
|
78 | + public function testValuesWithLinebreaks() { |
|
84 | 79 | $xpath = "mods:originInfo[@eventType='publication']=\"A\nB\nC\n\""; |
85 | 80 | $expectedXml = "<mods:originInfo eventType=\"publication\">A\nB\nC\n</mods:originInfo>"; |
86 | 81 | |
@@ -95,8 +90,7 @@ discard block |
||
95 | 90 | /** |
96 | 91 | * @test |
97 | 92 | */ |
98 | - public function testXMLGeneration5() |
|
99 | - { |
|
93 | + public function testXMLGeneration5() { |
|
100 | 94 | $xpath = "mods:originInfo[@xlink:href='test']"; |
101 | 95 | $expectedXml = "<mods:originInfo xlink:href=\"test\"/>"; |
102 | 96 |
@@ -17,8 +17,7 @@ discard block |
||
17 | 17 | /** |
18 | 18 | * InputOptionList |
19 | 19 | */ |
20 | -class InputOptionList extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity |
|
21 | -{ |
|
20 | +class InputOptionList extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity { |
|
22 | 21 | |
23 | 22 | /** |
24 | 23 | * name |
@@ -58,8 +57,7 @@ discard block |
||
58 | 57 | /** |
59 | 58 | * __construct |
60 | 59 | */ |
61 | - public function __construct() |
|
62 | - { |
|
60 | + public function __construct() { |
|
63 | 61 | |
64 | 62 | } |
65 | 63 | |
@@ -68,8 +66,7 @@ discard block |
||
68 | 66 | * |
69 | 67 | * @return string $name |
70 | 68 | */ |
71 | - public function getName() |
|
72 | - { |
|
69 | + public function getName() { |
|
73 | 70 | return $this->name; |
74 | 71 | } |
75 | 72 | |
@@ -79,8 +76,7 @@ discard block |
||
79 | 76 | * @param string $name |
80 | 77 | * @return void |
81 | 78 | */ |
82 | - public function setName($name) |
|
83 | - { |
|
79 | + public function setName($name) { |
|
84 | 80 | $this->name = $name; |
85 | 81 | } |
86 | 82 | |
@@ -89,8 +85,7 @@ discard block |
||
89 | 85 | * |
90 | 86 | * @return string $displayName |
91 | 87 | */ |
92 | - public function getDisplayName() |
|
93 | - { |
|
88 | + public function getDisplayName() { |
|
94 | 89 | return $this->displayName; |
95 | 90 | } |
96 | 91 | |
@@ -99,8 +94,7 @@ discard block |
||
99 | 94 | * |
100 | 95 | * @return string $valueList |
101 | 96 | */ |
102 | - public function getValueList() |
|
103 | - { |
|
97 | + public function getValueList() { |
|
104 | 98 | return $this->valueList; |
105 | 99 | } |
106 | 100 | |
@@ -110,8 +104,7 @@ discard block |
||
110 | 104 | * @param string $valueList |
111 | 105 | * @return void |
112 | 106 | */ |
113 | - public function setValueList($valueList) |
|
114 | - { |
|
107 | + public function setValueList($valueList) { |
|
115 | 108 | $this->valueList = $valueList; |
116 | 109 | } |
117 | 110 | |
@@ -120,8 +113,7 @@ discard block |
||
120 | 113 | * |
121 | 114 | * @return string $valueLabelList |
122 | 115 | */ |
123 | - public function getValueLabelList() |
|
124 | - { |
|
116 | + public function getValueLabelList() { |
|
125 | 117 | return $this->valueLabelList; |
126 | 118 | } |
127 | 119 | |
@@ -131,8 +123,7 @@ discard block |
||
131 | 123 | * @param string $valueLabelList |
132 | 124 | * @return void |
133 | 125 | */ |
134 | - public function setValueLabelList($valueLabelList) |
|
135 | - { |
|
126 | + public function setValueLabelList($valueLabelList) { |
|
136 | 127 | $this->valueLabelList = $valueLabelList; |
137 | 128 | } |
138 | 129 | |
@@ -142,8 +133,7 @@ discard block |
||
142 | 133 | * @param string $displayName |
143 | 134 | * @return void |
144 | 135 | */ |
145 | - public function setDisplayName($displayName) |
|
146 | - { |
|
136 | + public function setDisplayName($displayName) { |
|
147 | 137 | $this->displayName = $displayName; |
148 | 138 | } |
149 | 139 | |
@@ -153,8 +143,7 @@ discard block |
||
153 | 143 | * @return array $inputOptions |
154 | 144 | * @throws \Exception |
155 | 145 | */ |
156 | - public function getInputOptions() |
|
157 | - { |
|
146 | + public function getInputOptions() { |
|
158 | 147 | |
159 | 148 | $values = explode("|", $this->getValueList()); |
160 | 149 | $labels = explode("|", $this->getValueLabelList()); |
@@ -166,13 +155,11 @@ discard block |
||
166 | 155 | return array_combine($values, $labels); |
167 | 156 | } |
168 | 157 | |
169 | - public function setL10nParent($l10nParent) |
|
170 | - { |
|
158 | + public function setL10nParent($l10nParent) { |
|
171 | 159 | $this->l10nParent = $l10nParent; |
172 | 160 | } |
173 | 161 | |
174 | - public function setLanguageUid($languageUid) |
|
175 | - { |
|
162 | + public function setLanguageUid($languageUid) { |
|
176 | 163 | $this->_languageUid = $languageUid; |
177 | 164 | } |
178 | 165 | |
@@ -181,8 +168,7 @@ discard block |
||
181 | 168 | * |
182 | 169 | * @return string $defaultValue |
183 | 170 | */ |
184 | - public function getDefaultValue() |
|
185 | - { |
|
171 | + public function getDefaultValue() { |
|
186 | 172 | return $this->defaultValue; |
187 | 173 | } |
188 | 174 | |
@@ -192,8 +178,7 @@ discard block |
||
192 | 178 | * @param string $defaultValue |
193 | 179 | * @return void |
194 | 180 | */ |
195 | - public function setDefaultValue($defaultValue) |
|
196 | - { |
|
181 | + public function setDefaultValue($defaultValue) { |
|
197 | 182 | $this->defaultValue = $defaultValue; |
198 | 183 | } |
199 | 184 |
@@ -14,10 +14,8 @@ |
||
14 | 14 | * The TYPO3 project - inspiring people to share! |
15 | 15 | */ |
16 | 16 | |
17 | -class ActivateDocumentErrorException extends \Exception implements DPFExceptionInterface |
|
18 | -{ |
|
19 | - public function messageLanguageKey() |
|
20 | - { |
|
17 | +class ActivateDocumentErrorException extends \Exception implements DPFExceptionInterface { |
|
18 | + public function messageLanguageKey() { |
|
21 | 19 | return 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_activate.failure'; |
22 | 20 | } |
23 | 21 | } |
24 | 22 | \ No newline at end of file |
@@ -14,10 +14,8 @@ |
||
14 | 14 | * The TYPO3 project - inspiring people to share! |
15 | 15 | */ |
16 | 16 | |
17 | -class DeleteDocumentErrorException extends \Exception implements DPFExceptionInterface |
|
18 | -{ |
|
19 | - public function messageLanguageKey() |
|
20 | - { |
|
17 | +class DeleteDocumentErrorException extends \Exception implements DPFExceptionInterface { |
|
18 | + public function messageLanguageKey() { |
|
21 | 19 | return 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_delete.failure'; |
22 | 20 | } |
23 | 21 | } |
24 | 22 | \ No newline at end of file |
@@ -16,5 +16,5 @@ |
||
16 | 16 | |
17 | 17 | interface DPFExceptionInterface |
18 | 18 | { |
19 | - public function messageLanguageKey(); |
|
19 | + public function messageLanguageKey(); |
|
20 | 20 | } |
21 | 21 | \ No newline at end of file |
@@ -14,7 +14,6 @@ |
||
14 | 14 | * The TYPO3 project - inspiring people to share! |
15 | 15 | */ |
16 | 16 | |
17 | -interface DPFExceptionInterface |
|
18 | -{ |
|
17 | +interface DPFExceptionInterface { |
|
19 | 18 | public function messageLanguageKey(); |
20 | 19 | } |
21 | 20 | \ No newline at end of file |
@@ -14,10 +14,8 @@ |
||
14 | 14 | * The TYPO3 project - inspiring people to share! |
15 | 15 | */ |
16 | 16 | |
17 | -class RetrieveDocumentErrorException extends \Exception implements DPFExceptionInterface |
|
18 | -{ |
|
19 | - public function messageLanguageKey() |
|
20 | - { |
|
17 | +class RetrieveDocumentErrorException extends \Exception implements DPFExceptionInterface { |
|
18 | + public function messageLanguageKey() { |
|
21 | 19 | return 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_retrieve.failure'; |
22 | 20 | } |
23 | 21 | } |
24 | 22 | \ No newline at end of file |
@@ -14,10 +14,8 @@ |
||
14 | 14 | * The TYPO3 project - inspiring people to share! |
15 | 15 | */ |
16 | 16 | |
17 | -class IngestDocumentErrorException extends \Exception implements DPFExceptionInterface |
|
18 | -{ |
|
19 | - public function messageLanguageKey() |
|
20 | - { |
|
17 | +class IngestDocumentErrorException extends \Exception implements DPFExceptionInterface { |
|
18 | + public function messageLanguageKey() { |
|
21 | 19 | return 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_ingest.failure'; |
22 | 20 | } |
23 | 21 | } |
24 | 22 | \ No newline at end of file |
@@ -14,10 +14,8 @@ |
||
14 | 14 | * The TYPO3 project - inspiring people to share! |
15 | 15 | */ |
16 | 16 | |
17 | -class UpdateDocumentErrorException extends \Exception implements DPFExceptionInterface |
|
18 | -{ |
|
19 | - public function messageLanguageKey() |
|
20 | - { |
|
17 | +class UpdateDocumentErrorException extends \Exception implements DPFExceptionInterface { |
|
18 | + public function messageLanguageKey() { |
|
21 | 19 | return 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_update.failure'; |
22 | 20 | } |
23 | 21 | } |
24 | 22 | \ No newline at end of file |
@@ -14,10 +14,8 @@ |
||
14 | 14 | * The TYPO3 project - inspiring people to share! |
15 | 15 | */ |
16 | 16 | |
17 | -class RestoreDocumentErrorException extends \Exception implements DPFExceptionInterface |
|
18 | -{ |
|
19 | - public function messageLanguageKey() |
|
20 | - { |
|
17 | +class RestoreDocumentErrorException extends \Exception implements DPFExceptionInterface { |
|
18 | + public function messageLanguageKey() { |
|
21 | 19 | return 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_restore.failure'; |
22 | 20 | } |
23 | 21 | } |
24 | 22 | \ No newline at end of file |