Passed
Pull Request — master (#123)
by
unknown
06:40
created
Classes/Domain/Repository/FormatRepository.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 FormatRepository extends Repository
26
-{
25
+class FormatRepository extends Repository {
27 26
 
28 27
 }
Please login to merge, or discard this patch.
Classes/Domain/Repository/TokenRepository.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 TokenRepository extends Repository
26
-{
25
+class TokenRepository extends Repository {
27 26
     /**
28 27
      * Delete all expired token
29 28
      *
Please login to merge, or discard this patch.
Classes/Domain/Repository/SolrCoreRepository.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 SolrCoreRepository extends Repository
26
-{
25
+class SolrCoreRepository extends Repository {
27 26
 
28 27
 }
Please login to merge, or discard this patch.
Classes/Domain/Repository/LibraryRepository.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 LibraryRepository extends Repository
26
-{
25
+class LibraryRepository extends Repository {
27 26
 
28 27
 }
Please login to merge, or discard this patch.
Classes/Domain/Repository/ActionLogRepository.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 ActionLogRepository extends Repository
26
-{
25
+class ActionLogRepository extends Repository {
27 26
 
28 27
 }
Please login to merge, or discard this patch.
Classes/Domain/Repository/MailRepository.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@  discard block
 block discarded – undo
25 25
  *
26 26
  * @access public
27 27
  */
28
-class MailRepository extends Repository
29
-{
28
+class MailRepository extends Repository {
30 29
 
31 30
     /**
32 31
      * Find all mails by pid.
@@ -37,8 +36,7 @@  discard block
 block discarded – undo
37 36
      * 
38 37
      * @return array|QueryResultInterface
39 38
      */
40
-    public function findAllWithPid(int $pid)
41
-    {
39
+    public function findAllWithPid(int $pid) {
42 40
         /** @var Typo3QuerySettings $querySettings */
43 41
         $querySettings = GeneralUtility::makeInstance(Typo3QuerySettings::class);
44 42
 
Please login to merge, or discard this patch.
Classes/Domain/Repository/BasketRepository.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 BasketRepository extends Repository
26
-{
25
+class BasketRepository extends Repository {
27 26
 
28 27
 }
Please login to merge, or discard this patch.
Classes/Domain/Repository/DocumentRepository.php 3 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
 
385 385
         $excludeOtherWhere = '';
386 386
         if ($settings['excludeOther']) {
387
-            $excludeOtherWhere = 'tx_dlf_documents.pid=' . intval($settings['storagePid']);
387
+            $excludeOtherWhere = 'tx_dlf_documents.pid='.intval($settings['storagePid']);
388 388
         }
389 389
         // Check if there are any metadata to suggest.
390 390
         return $queryBuilder
@@ -438,12 +438,12 @@  discard block
 block discarded – undo
438 438
         $connection = GeneralUtility::makeInstance(ConnectionPool::class)
439 439
             ->getConnectionForTable('tx_dlf_documents');
440 440
 
441
-        $sql = 'SELECT `tx_dlf_documents`.*, GROUP_CONCAT(DISTINCT `tx_dlf_collections`.`oai_name` ORDER BY `tx_dlf_collections`.`oai_name` SEPARATOR " ") AS `collections` ' .
442
-            'FROM `tx_dlf_documents` ' .
443
-            'INNER JOIN `tx_dlf_relations` ON `tx_dlf_relations`.`uid_local` = `tx_dlf_documents`.`uid` ' .
444
-            'INNER JOIN `tx_dlf_collections` ON `tx_dlf_collections`.`uid` = `tx_dlf_relations`.`uid_foreign` ' .
445
-            'WHERE `tx_dlf_documents`.`record_id` = ? ' .
446
-            'AND `tx_dlf_relations`.`ident`="docs_colls" ' .
441
+        $sql = 'SELECT `tx_dlf_documents`.*, GROUP_CONCAT(DISTINCT `tx_dlf_collections`.`oai_name` ORDER BY `tx_dlf_collections`.`oai_name` SEPARATOR " ") AS `collections` '.
442
+            'FROM `tx_dlf_documents` '.
443
+            'INNER JOIN `tx_dlf_relations` ON `tx_dlf_relations`.`uid_local` = `tx_dlf_documents`.`uid` '.
444
+            'INNER JOIN `tx_dlf_collections` ON `tx_dlf_collections`.`uid` = `tx_dlf_relations`.`uid_foreign` '.
445
+            'WHERE `tx_dlf_documents`.`record_id` = ? '.
446
+            'AND `tx_dlf_relations`.`ident`="docs_colls" '.
447 447
             $where;
448 448
 
449 449
         $values = [
@@ -474,13 +474,13 @@  discard block
 block discarded – undo
474 474
         $connection = GeneralUtility::makeInstance(ConnectionPool::class)
475 475
             ->getConnectionForTable('tx_dlf_documents');
476 476
 
477
-        $sql = 'SELECT `tx_dlf_documents`.*, GROUP_CONCAT(DISTINCT `tx_dlf_collections`.`oai_name` ORDER BY `tx_dlf_collections`.`oai_name` SEPARATOR " ") AS `collections` ' .
478
-            'FROM `tx_dlf_documents` ' .
479
-            'INNER JOIN `tx_dlf_relations` ON `tx_dlf_relations`.`uid_local` = `tx_dlf_documents`.`uid` ' .
480
-            'INNER JOIN `tx_dlf_collections` ON `tx_dlf_collections`.`uid` = `tx_dlf_relations`.`uid_foreign` ' .
481
-            'WHERE `tx_dlf_documents`.`uid` IN ( ? ) ' .
482
-            'AND `tx_dlf_relations`.`ident`="docs_colls" ' .
483
-            'AND ' . Helper::whereExpression('tx_dlf_collections') . ' ' .
477
+        $sql = 'SELECT `tx_dlf_documents`.*, GROUP_CONCAT(DISTINCT `tx_dlf_collections`.`oai_name` ORDER BY `tx_dlf_collections`.`oai_name` SEPARATOR " ") AS `collections` '.
478
+            'FROM `tx_dlf_documents` '.
479
+            'INNER JOIN `tx_dlf_relations` ON `tx_dlf_relations`.`uid_local` = `tx_dlf_documents`.`uid` '.
480
+            'INNER JOIN `tx_dlf_collections` ON `tx_dlf_collections`.`uid` = `tx_dlf_relations`.`uid_foreign` '.
481
+            'WHERE `tx_dlf_documents`.`uid` IN ( ? ) '.
482
+            'AND `tx_dlf_relations`.`ident`="docs_colls" '.
483
+            'AND '.Helper::whereExpression('tx_dlf_collections').' '.
484 484
             'GROUP BY `tx_dlf_documents`.`uid` ';
485 485
 
486 486
         $values = [
Please login to merge, or discard this 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 = [];
@@ -200,8 +194,7 @@  discard block
 block discarded – undo
200 194
      *
201 195
      * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface
202 196
      */
203
-    public function findAllByCollectionsLimited($collections, int $limit = 50, int $offset = 0)
204
-    {
197
+    public function findAllByCollectionsLimited($collections, int $limit = 50, int $offset = 0) {
205 198
         $query = $this->createQuery();
206 199
 
207 200
         // order by start_date -> start_time...
@@ -241,8 +234,7 @@  discard block
 block discarded – undo
241 234
      *
242 235
      * @return array
243 236
      */
244
-    public function getStatisticsForSelectedCollection($settings)
245
-    {
237
+    public function getStatisticsForSelectedCollection($settings) {
246 238
         if ($settings['collections']) {
247 239
             // Include only selected collections.
248 240
             $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
@@ -378,8 +370,7 @@  discard block
 block discarded – undo
378 370
      *
379 371
      * @return Result
380 372
      */
381
-    public function getTableOfContentsFromDb($uid, $pid, $settings)
382
-    {
373
+    public function getTableOfContentsFromDb($uid, $pid, $settings) {
383 374
         // Build table of contents from database.
384 375
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
385 376
             ->getQueryBuilderForTable('tx_dlf_documents');
@@ -429,8 +420,7 @@  discard block
 block discarded – undo
429 420
      *
430 421
      * @return array The found document object
431 422
      */
432
-    public function getOaiRecord($settings, $parameters)
433
-    {
423
+    public function getOaiRecord($settings, $parameters) {
434 424
         $where = '';
435 425
 
436 426
         if (!$settings['show_userdefined']) {
@@ -507,8 +497,7 @@  discard block
 block discarded – undo
507 497
      *
508 498
      * @return array
509 499
      */
510
-    public function findAllByUids($uids, $checkPartof = false)
511
-    {
500
+    public function findAllByUids($uids, $checkPartof = false) {
512 501
         // get all documents from db we are talking about
513 502
         $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
514 503
         $queryBuilder = $connectionPool->getQueryBuilderForTable('tx_dlf_documents');
@@ -557,8 +546,7 @@  discard block
 block discarded – undo
557 546
      *
558 547
      * @return array
559 548
      */
560
-    public function findChildrenOfEach(array $uids)
561
-    {
549
+    public function findChildrenOfEach(array $uids) {
562 550
         $allDocuments = $this->findAllByUids($uids, true);
563 551
 
564 552
         $result = [];
@@ -583,8 +571,7 @@  discard block
 block discarded – undo
583 571
      *
584 572
      * @return SolrSearch
585 573
      */
586
-    public function findSolrByCollection(Collection $collection, $settings, $searchParams, $listedMetadata = null, $indexedMetadata = null)
587
-    {
574
+    public function findSolrByCollection(Collection $collection, $settings, $searchParams, $listedMetadata = null, $indexedMetadata = null) {
588 575
         return $this->findSolr([$collection], $settings, $searchParams, $listedMetadata, $indexedMetadata);
589 576
     }
590 577
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function findOneByParameters($parameters)
65 65
     {
66
-        $doc = null;
67
-        $document = null;
66
+        $doc = NULL;
67
+        $document = NULL;
68 68
 
69 69
         if (isset($parameters['id']) && MathUtility::canBeInterpretedAsInteger($parameters['id'])) {
70 70
 
@@ -76,13 +76,13 @@  discard block
 block discarded – undo
76 76
 
77 77
         } else if (isset($parameters['location']) && GeneralUtility::isValidUrl($parameters['location'])) {
78 78
 
79
-            $doc = AbstractDocument::getInstance($parameters['location'], [], true);
79
+            $doc = AbstractDocument::getInstance($parameters['location'], [], TRUE);
80 80
 
81 81
             if ($doc->recordId) {
82 82
                 $document = $this->findOneByRecordId($doc->recordId);
83 83
             }
84 84
 
85
-            if ($document === null) {
85
+            if ($document === NULL) {
86 86
                 // create new (dummy) Document object
87 87
                 $document = GeneralUtility::makeInstance(Document::class);
88 88
                 $document->setLocation($parameters['location']);
@@ -90,11 +90,11 @@  discard block
 block discarded – undo
90 90
 
91 91
         }
92 92
 
93
-        if ($document !== null && $doc === null) {
94
-            $doc = AbstractDocument::getInstance($document->getLocation(), [], true);
93
+        if ($document !== NULL && $doc === NULL) {
94
+            $doc = AbstractDocument::getInstance($document->getLocation(), [], TRUE);
95 95
         }
96 96
 
97
-        if ($doc !== null) {
97
+        if ($doc !== NULL) {
98 98
             $document->setCurrentDocument($doc);
99 99
         }
100 100
 
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
         }
178 178
 
179 179
         if (isset($settings['excludeOther']) && (int) $settings['excludeOther'] === 0) {
180
-            $query->getQuerySettings()->setRespectStoragePage(false);
180
+            $query->getQuerySettings()->setRespectStoragePage(FALSE);
181 181
         }
182 182
 
183 183
         if (count($constraints)) {
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
      *
508 508
      * @return array
509 509
      */
510
-    public function findAllByUids($uids, $checkPartof = false)
510
+    public function findAllByUids($uids, $checkPartof = FALSE)
511 511
     {
512 512
         // get all documents from db we are talking about
513 513
         $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
      */
560 560
     public function findChildrenOfEach(array $uids)
561 561
     {
562
-        $allDocuments = $this->findAllByUids($uids, true);
562
+        $allDocuments = $this->findAllByUids($uids, TRUE);
563 563
 
564 564
         $result = [];
565 565
         foreach ($allDocuments as $doc) {
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
      *
584 584
      * @return SolrSearch
585 585
      */
586
-    public function findSolrByCollection(Collection $collection, $settings, $searchParams, $listedMetadata = null, $indexedMetadata = null)
586
+    public function findSolrByCollection(Collection $collection, $settings, $searchParams, $listedMetadata = NULL, $indexedMetadata = NULL)
587 587
     {
588 588
         return $this->findSolr([$collection], $settings, $searchParams, $listedMetadata, $indexedMetadata);
589 589
     }
@@ -601,7 +601,7 @@  discard block
 block discarded – undo
601 601
      *
602 602
      * @return SolrSearch
603 603
      */
604
-    public function findSolrByCollections($collections, $settings, $searchParams, $listedMetadata = null, $indexedMetadata = null): SolrSearch
604
+    public function findSolrByCollections($collections, $settings, $searchParams, $listedMetadata = NULL, $indexedMetadata = NULL): SolrSearch
605 605
     {
606 606
         return $this->findSolr($collections, $settings, $searchParams, $listedMetadata, $indexedMetadata);
607 607
     }
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
      *
619 619
      * @return SolrSearch
620 620
      */
621
-    public function findSolrWithoutCollection($settings, $searchParams, $listedMetadata = null, $indexedMetadata = null): SolrSearch
621
+    public function findSolrWithoutCollection($settings, $searchParams, $listedMetadata = NULL, $indexedMetadata = NULL): SolrSearch
622 622
     {
623 623
         return $this->findSolr([], $settings, $searchParams, $listedMetadata, $indexedMetadata);
624 624
     }
@@ -635,7 +635,7 @@  discard block
 block discarded – undo
635 635
      *
636 636
      * @return SolrSearch
637 637
      */
638
-    private function findSolr($collections, $settings, $searchParams, $listedMetadata = null, $indexedMetadata = null): SolrSearch
638
+    private function findSolr($collections, $settings, $searchParams, $listedMetadata = NULL, $indexedMetadata = NULL): SolrSearch
639 639
     {
640 640
         // set settings global inside this repository
641 641
         // (may be necessary when SolrSearch calls back)
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.