@@ -32,8 +32,7 @@ discard block |
||
32 | 32 | * @subpackage dlf |
33 | 33 | * @access public |
34 | 34 | */ |
35 | -class Generator |
|
36 | -{ |
|
35 | +class Generator { |
|
37 | 36 | /** |
38 | 37 | * @var ObjectManager |
39 | 38 | */ |
@@ -49,8 +48,7 @@ discard block |
||
49 | 48 | */ |
50 | 49 | protected $dataMapper; |
51 | 50 | |
52 | - public function __construct() |
|
53 | - { |
|
51 | + public function __construct() { |
|
54 | 52 | $this->objectManager = GeneralUtility::makeInstance(ObjectManager::class); |
55 | 53 | $this->languageService = $this->objectManager->get(LanguageService::class); |
56 | 54 | $this->dataMapper = $this->objectManager->get(DataMapper::class); |
@@ -167,8 +165,7 @@ discard block |
||
167 | 165 | return $result; |
168 | 166 | } |
169 | 167 | |
170 | - protected function parseDocComment($docComment) |
|
171 | - { |
|
168 | + protected function parseDocComment($docComment) { |
|
172 | 169 | // TODO: Consider using phpDocumentor (though that splits the docblock into summary and description) |
173 | 170 | |
174 | 171 | // Adopted from DocCommentParser in TYPO3 v9 |
@@ -193,8 +190,7 @@ discard block |
||
193 | 190 | /** |
194 | 191 | * Transform table structure into .rst page. |
195 | 192 | */ |
196 | - public function generatePage(array $tables) |
|
197 | - { |
|
193 | + public function generatePage(array $tables) { |
|
198 | 194 | $page = new RstSection(); |
199 | 195 | $page->setHeader('Database Tables'); |
200 | 196 | $page->addText(<<<RST |
@@ -25,8 +25,7 @@ |
||
25 | 25 | * |
26 | 26 | * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface |
27 | 27 | */ |
28 | - public function findBySettings($settings = []) |
|
29 | - { |
|
28 | + public function findBySettings($settings = []) { |
|
30 | 29 | $query = $this->createQuery(); |
31 | 30 | |
32 | 31 | $constraints = []; |
@@ -35,8 +35,7 @@ discard block |
||
35 | 35 | * |
36 | 36 | * @return \TYPO3\CMS\Extbase\Persistence\QueryResultInterface |
37 | 37 | */ |
38 | - public function findAllByUids($uids) |
|
39 | - { |
|
38 | + public function findAllByUids($uids) { |
|
40 | 39 | $query = $this->createQuery(); |
41 | 40 | |
42 | 41 | $constraints = []; |
@@ -49,8 +48,7 @@ discard block |
||
49 | 48 | return $query->execute(); |
50 | 49 | } |
51 | 50 | |
52 | - public function getCollectionForMetadata($pages) |
|
53 | - { |
|
51 | + public function getCollectionForMetadata($pages) { |
|
54 | 52 | // Get list of collections to show. |
55 | 53 | $query = $this->createQuery(); |
56 | 54 | |
@@ -66,8 +64,7 @@ discard block |
||
66 | 64 | * |
67 | 65 | * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface |
68 | 66 | */ |
69 | - public function findCollectionsBySettings($settings = []) |
|
70 | - { |
|
67 | + public function findCollectionsBySettings($settings = []) { |
|
71 | 68 | $query = $this->createQuery(); |
72 | 69 | |
73 | 70 | $constraints = []; |
@@ -104,8 +101,7 @@ discard block |
||
104 | 101 | return $query->execute(); |
105 | 102 | } |
106 | 103 | |
107 | - public function getIndexNameForSolr($settings, $set) |
|
108 | - { |
|
104 | + public function getIndexNameForSolr($settings, $set) { |
|
109 | 105 | $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class) |
110 | 106 | ->getQueryBuilderForTable('tx_dlf_collections'); |
111 | 107 |
@@ -25,8 +25,7 @@ |
||
25 | 25 | * |
26 | 26 | * @return void |
27 | 27 | */ |
28 | - public function deleteExpiredTokens($expireTime) |
|
29 | - { |
|
28 | + public function deleteExpiredTokens($expireTime) { |
|
30 | 29 | $query = $this->createQuery(); |
31 | 30 | |
32 | 31 | $constraints = []; |
@@ -18,8 +18,7 @@ |
||
18 | 18 | class MailRepository extends \TYPO3\CMS\Extbase\Persistence\Repository |
19 | 19 | { |
20 | 20 | |
21 | - public function findAllWithPid($pid) |
|
22 | - { |
|
21 | + public function findAllWithPid($pid) { |
|
23 | 22 | /** @var Typo3QuerySettings $querySettings */ |
24 | 23 | $querySettings = GeneralUtility::makeInstance(Typo3QuerySettings::class); |
25 | 24 |
@@ -109,14 +109,12 @@ discard block |
||
109 | 109 | /** |
110 | 110 | * constructor |
111 | 111 | */ |
112 | - public function __construct() |
|
113 | - { |
|
112 | + public function __construct() { |
|
114 | 113 | // Do not remove the next line: It would break the functionality |
115 | 114 | $this->initStorageObjects(); |
116 | 115 | } |
117 | 116 | |
118 | - protected function initStorageObjects() |
|
119 | - { |
|
117 | + protected function initStorageObjects() { |
|
120 | 118 | $this->format = new ObjectStorage(); |
121 | 119 | } |
122 | 120 | |
@@ -187,8 +185,7 @@ discard block |
||
187 | 185 | /** |
188 | 186 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Kitodo\Dlf\Domain\Model\MetadataFormat> $format |
189 | 187 | */ |
190 | - public function getFormat() |
|
191 | - { |
|
188 | + public function getFormat() { |
|
192 | 189 | return $this->format; |
193 | 190 | } |
194 | 191 | |
@@ -207,8 +204,7 @@ discard block |
||
207 | 204 | * |
208 | 205 | * @return void |
209 | 206 | */ |
210 | - public function addFormat(MetadataFormat $format) |
|
211 | - { |
|
207 | + public function addFormat(MetadataFormat $format) { |
|
212 | 208 | $this->format->attach($format); |
213 | 209 | } |
214 | 210 | |
@@ -219,8 +215,7 @@ discard block |
||
219 | 215 | * |
220 | 216 | * @return void |
221 | 217 | */ |
222 | - public function removeFormat(MetadataFormat $formatToRemove) |
|
223 | - { |
|
218 | + public function removeFormat(MetadataFormat $formatToRemove) { |
|
224 | 219 | $this->format->detach($formatToRemove); |
225 | 220 | } |
226 | 221 |
@@ -192,14 +192,12 @@ discard block |
||
192 | 192 | /** |
193 | 193 | * constructor |
194 | 194 | */ |
195 | - public function __construct() |
|
196 | - { |
|
195 | + public function __construct() { |
|
197 | 196 | // Do not remove the next line: It would break the functionality |
198 | 197 | $this->initStorageObjects(); |
199 | 198 | } |
200 | 199 | |
201 | - protected function initStorageObjects() |
|
202 | - { |
|
200 | + protected function initStorageObjects() { |
|
203 | 201 | $this->collections = new ObjectStorage(); |
204 | 202 | } |
205 | 203 | |
@@ -577,8 +575,7 @@ discard block |
||
577 | 575 | * |
578 | 576 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Kitodo\Dlf\Domain\Model\Collection> $collections |
579 | 577 | */ |
580 | - public function getCollections() |
|
581 | - { |
|
578 | + public function getCollections() { |
|
582 | 579 | return $this->collections; |
583 | 580 | } |
584 | 581 | |
@@ -607,8 +604,7 @@ discard block |
||
607 | 604 | * |
608 | 605 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Kitodo\Dlf\Domain\Model\Collection> collections |
609 | 606 | */ |
610 | - public function removeCollection(Collection $collection) |
|
611 | - { |
|
607 | + public function removeCollection(Collection $collection) { |
|
612 | 608 | $this->collections->detach($collection); |
613 | 609 | } |
614 | 610 |
@@ -44,8 +44,7 @@ discard block |
||
44 | 44 | /** |
45 | 45 | * @param DocumentRepository $documentRepository |
46 | 46 | */ |
47 | - public function injectDocumentRepository(DocumentRepository $documentRepository) |
|
48 | - { |
|
47 | + public function injectDocumentRepository(DocumentRepository $documentRepository) { |
|
49 | 48 | $this->documentRepository = $documentRepository; |
50 | 49 | } |
51 | 50 | |
@@ -85,8 +84,7 @@ discard block |
||
85 | 84 | * @access protected |
86 | 85 | * @return void |
87 | 86 | */ |
88 | - protected function initialize() |
|
89 | - { |
|
87 | + protected function initialize() { |
|
90 | 88 | $this->requestData = GeneralUtility::_GPmerged('tx_dlf'); |
91 | 89 | if (empty($this->requestData['page'])) { |
92 | 90 | $this->requestData['page'] = 1; |
@@ -112,8 +110,7 @@ discard block |
||
112 | 110 | * |
113 | 111 | * @return void |
114 | 112 | */ |
115 | - protected function loadDocument($requestData) |
|
116 | - { |
|
113 | + protected function loadDocument($requestData) { |
|
117 | 114 | // Try to get document format from database |
118 | 115 | if (!empty($requestData['id'])) { |
119 | 116 | |
@@ -186,8 +183,7 @@ discard block |
||
186 | 183 | * |
187 | 184 | * @return null|string|array |
188 | 185 | */ |
189 | - protected function getParametersSafely($parameterName) |
|
190 | - { |
|
186 | + protected function getParametersSafely($parameterName) { |
|
191 | 187 | if ($this->request->hasArgument($parameterName)) { |
192 | 188 | return $this->request->getArgument($parameterName); |
193 | 189 | } |
@@ -201,8 +197,7 @@ discard block |
||
201 | 197 | * |
202 | 198 | * @return void |
203 | 199 | */ |
204 | - public function __construct() |
|
205 | - { |
|
200 | + public function __construct() { |
|
206 | 201 | $this->initialize(); |
207 | 202 | } |
208 | 203 | } |
@@ -32,8 +32,7 @@ |
||
32 | 32 | * |
33 | 33 | * @return void |
34 | 34 | */ |
35 | - public function extractMetadata(\SimpleXMLElement $xml, array &$metadata) |
|
36 | - { |
|
35 | + public function extractMetadata(\SimpleXMLElement $xml, array &$metadata) { |
|
37 | 36 | $xml->registerXPathNamespace('teihdr', 'http://www.tei-c.org/ns/1.0'); |
38 | 37 | } |
39 | 38 | } |