Passed
Pull Request — master (#123)
by
unknown
03:55
created
Classes/Domain/Repository/DocumentRepository.php 1 patch
Braces   +13 added lines, -26 removed lines patch added patch discarded remove patch
@@ -36,8 +36,7 @@  discard block
 block discarded – undo
36 36
  *
37 37
  * @access public
38 38
  */
39
-class DocumentRepository extends Repository
40
-{
39
+class DocumentRepository extends Repository {
41 40
     /**
42 41
      * @access protected
43 42
      * @var array The controller settings passed to the repository for some special actions.
@@ -61,8 +60,7 @@  discard block
 block discarded – undo
61 60
      *
62 61
      * @return Document|null
63 62
      */
64
-    public function findOneByParameters($parameters)
65
-    {
63
+    public function findOneByParameters($parameters) {
66 64
         $doc = null;
67 65
         $document = null;
68 66
 
@@ -108,8 +106,7 @@  discard block
 block discarded – undo
108 106
      *
109 107
      * @return Document|null
110 108
      */
111
-    public function findOldestDocument()
112
-    {
109
+    public function findOldestDocument() {
113 110
         $query = $this->createQuery();
114 111
 
115 112
         $query->setOrderings(['tstamp' => QueryInterface::ORDER_ASCENDING]);
@@ -126,8 +123,7 @@  discard block
 block discarded – undo
126 123
      *
127 124
      * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface
128 125
      */
129
-    public function getChildrenOfYearAnchor($partOf, $structure)
130
-    {
126
+    public function getChildrenOfYearAnchor($partOf, $structure) {
131 127
         $query = $this->createQuery();
132 128
 
133 129
         $query->matching($query->equals('structure', $structure));
@@ -150,8 +146,7 @@  discard block
 block discarded – undo
150 146
      *
151 147
      * @return Document|null
152 148
      */
153
-    public function findOneByIdAndSettings($uid, $settings = [])
154
-    {
149
+    public function findOneByIdAndSettings($uid, $settings = []) {
155 150
         $settings = ['documentSets' => $uid];
156 151
 
157 152
         return $this->findDocumentsBySettings($settings)->getFirst();
@@ -166,8 +161,7 @@  discard block
 block discarded – undo
166 161
      *
167 162
      * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface
168 163
      */
169
-    public function findDocumentsBySettings($settings = [])
170
-    {
164
+    public function findDocumentsBySettings($settings = []) {
171 165
         $query = $this->createQuery();
172 166
 
173 167
         $constraints = [];
@@ -199,8 +193,7 @@  discard block
 block discarded – undo
199 193
      *
200 194
      * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface
201 195
      */
202
-    public function findAllByCollectionsLimited($collections, $limit = 50)
203
-    {
196
+    public function findAllByCollectionsLimited($collections, $limit = 50) {
204 197
         $query = $this->createQuery();
205 198
 
206 199
         // order by start_date -> start_time...
@@ -239,8 +232,7 @@  discard block
 block discarded – undo
239 232
      *
240 233
      * @return array
241 234
      */
242
-    public function getStatisticsForSelectedCollection($settings)
243
-    {
235
+    public function getStatisticsForSelectedCollection($settings) {
244 236
         if ($settings['collections']) {
245 237
             // Include only selected collections.
246 238
             $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
@@ -376,8 +368,7 @@  discard block
 block discarded – undo
376 368
      *
377 369
      * @return Result
378 370
      */
379
-    public function getTableOfContentsFromDb($uid, $pid, $settings)
380
-    {
371
+    public function getTableOfContentsFromDb($uid, $pid, $settings) {
381 372
         // Build table of contents from database.
382 373
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
383 374
             ->getQueryBuilderForTable('tx_dlf_documents');
@@ -427,8 +418,7 @@  discard block
 block discarded – undo
427 418
      *
428 419
      * @return array The found document object
429 420
      */
430
-    public function getOaiRecord($settings, $parameters)
431
-    {
421
+    public function getOaiRecord($settings, $parameters) {
432 422
         $where = '';
433 423
 
434 424
         if (!$settings['show_userdefined']) {
@@ -505,8 +495,7 @@  discard block
 block discarded – undo
505 495
      *
506 496
      * @return array
507 497
      */
508
-    public function findAllByUids($uids, $checkPartof = false)
509
-    {
498
+    public function findAllByUids($uids, $checkPartof = false) {
510 499
         // get all documents from db we are talking about
511 500
         $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
512 501
         $queryBuilder = $connectionPool->getQueryBuilderForTable('tx_dlf_documents');
@@ -555,8 +544,7 @@  discard block
 block discarded – undo
555 544
      *
556 545
      * @return array
557 546
      */
558
-    public function findChildrenOfEach(array $uids)
559
-    {
547
+    public function findChildrenOfEach(array $uids) {
560 548
         $allDocuments = $this->findAllByUids($uids, true);
561 549
 
562 550
         $result = [];
@@ -580,8 +568,7 @@  discard block
 block discarded – undo
580 568
      *
581 569
      * @return SolrSearch
582 570
      */
583
-    public function findSolrByCollection(Collection $collection, $settings, $searchParams, $listedMetadata = null)
584
-    {
571
+    public function findSolrByCollection(Collection $collection, $settings, $searchParams, $listedMetadata = null) {
585 572
         return $this->findSolr([$collection], $settings, $searchParams, $listedMetadata);
586 573
     }
587 574
 
Please login to merge, or discard this patch.
Classes/Domain/Repository/MetadataFormatRepository.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,6 @@
 block discarded – undo
22 22
  *
23 23
  * @access public
24 24
  */
25
-class MetadataFormatRepository extends Repository
26
-{
25
+class MetadataFormatRepository extends Repository {
27 26
 
28 27
 }
Please login to merge, or discard this patch.
Classes/Domain/Repository/CollectionRepository.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@
 block discarded – undo
28 28
  *
29 29
  * @access public
30 30
  */
31
-class CollectionRepository extends Repository
32
-{
31
+class CollectionRepository extends Repository {
33 32
     /**
34 33
      * @access protected
35 34
      * @var array Set the default ordering. This is applied to findAll(), too.
Please login to merge, or discard this patch.
Classes/Domain/Repository/PrinterRepository.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,6 @@
 block discarded – undo
22 22
  *
23 23
  * @access public
24 24
  */
25
-class PrinterRepository extends Repository
26
-{
25
+class PrinterRepository extends Repository {
27 26
 
28 27
 }
Please login to merge, or discard this patch.
Classes/Domain/Model/Structure.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@
 block discarded – undo
22 22
  *
23 23
  * @access public
24 24
  */
25
-class Structure extends AbstractEntity
26
-{
25
+class Structure extends AbstractEntity {
27 26
     /**
28 27
      * @access protected
29 28
      * @var Structure
Please login to merge, or discard this patch.
Classes/Domain/Model/Collection.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
  *
24 24
  * @access public
25 25
  */
26
-class Collection extends AbstractEntity
27
-{
26
+class Collection extends AbstractEntity {
28 27
     /**
29 28
      * @access protected
30 29
      * @var int
Please login to merge, or discard this patch.
Classes/Domain/Model/Mail.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@
 block discarded – undo
22 22
  *
23 23
  * @access public
24 24
  */
25
-class Mail extends AbstractEntity
26
-{
25
+class Mail extends AbstractEntity {
27 26
     /**
28 27
      * @access protected
29 28
      * @var string
Please login to merge, or discard this patch.
Classes/Domain/Model/Document.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -26,8 +26,7 @@  discard block
 block discarded – undo
26 26
  *
27 27
  * @access public
28 28
  */
29
-class Document extends AbstractEntity
30
-{
29
+class Document extends AbstractEntity {
31 30
     /**
32 31
      * @access protected
33 32
      * @var \DateTime
@@ -225,14 +224,12 @@  discard block
 block discarded – undo
225 224
     /**
226 225
      * constructor
227 226
      */
228
-    public function __construct()
229
-    {
227
+    public function __construct() {
230 228
         // Do not remove the next line: It would break the functionality
231 229
         $this->initStorageObjects();
232 230
     }
233 231
 
234
-    protected function initStorageObjects()
235
-    {
232
+    protected function initStorageObjects() {
236 233
         $this->collections = new ObjectStorage();
237 234
     }
238 235
 
@@ -610,8 +607,7 @@  discard block
 block discarded – undo
610 607
      *
611 608
      * @return ObjectStorage<Collection> $collections
612 609
      */
613
-    public function getCollections()
614
-    {
610
+    public function getCollections() {
615 611
         return $this->collections;
616 612
     }
617 613
 
Please login to merge, or discard this patch.
Classes/Domain/Model/Metadata.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@  discard block
 block discarded – undo
24 24
  *
25 25
  * @access public
26 26
  */
27
-class Metadata extends AbstractEntity
28
-{
27
+class Metadata extends AbstractEntity {
29 28
     /**
30 29
      * @access protected
31 30
      * @var Metadata
@@ -128,14 +127,12 @@  discard block
 block discarded – undo
128 127
     /**
129 128
      * constructor
130 129
      */
131
-    public function __construct()
132
-    {
130
+    public function __construct() {
133 131
         // Do not remove the next line: It would break the functionality
134 132
         $this->initStorageObjects();
135 133
     }
136 134
 
137
-    protected function initStorageObjects()
138
-    {
135
+    protected function initStorageObjects() {
139 136
         $this->format = new ObjectStorage();
140 137
     }
141 138
 
@@ -206,8 +203,7 @@  discard block
 block discarded – undo
206 203
     /**
207 204
      * @return ObjectStorage<MetadataFormat> $format
208 205
      */
209
-    public function getFormat()
210
-    {
206
+    public function getFormat() {
211 207
         return $this->format;
212 208
     }
213 209
 
@@ -226,8 +222,7 @@  discard block
 block discarded – undo
226 222
      *
227 223
      * @return void
228 224
      */
229
-    public function addFormat(MetadataFormat $format)
230
-    {
225
+    public function addFormat(MetadataFormat $format) {
231 226
         $this->format->attach($format);
232 227
     }
233 228
 
@@ -238,8 +233,7 @@  discard block
 block discarded – undo
238 233
      *
239 234
      * @return void
240 235
      */
241
-    public function removeFormat(MetadataFormat $formatToRemove)
242
-    {
236
+    public function removeFormat(MetadataFormat $formatToRemove) {
243 237
         $this->format->detach($formatToRemove);
244 238
     }
245 239
 
Please login to merge, or discard this patch.