@@ -21,15 +21,13 @@ |
||
| 21 | 21 | * @subpackage dlf |
| 22 | 22 | * @access public |
| 23 | 23 | */ |
| 24 | -class StatisticsController extends AbstractController |
|
| 25 | -{ |
|
| 24 | +class StatisticsController extends AbstractController { |
|
| 26 | 25 | /** |
| 27 | 26 | * The main method of the plugin |
| 28 | 27 | * |
| 29 | 28 | * @return void |
| 30 | 29 | */ |
| 31 | - public function mainAction() |
|
| 32 | - { |
|
| 30 | + public function mainAction() { |
|
| 33 | 31 | $foundNumbers = $this->documentRepository->getStatisticsForSelectedCollection($this->settings); |
| 34 | 32 | |
| 35 | 33 | // Set replacements. |
@@ -210,7 +210,6 @@ |
||
| 210 | 210 | * Volumes are documents that are both |
| 211 | 211 | * a) "leaf" elements i.e. partof != 0 |
| 212 | 212 | * b) "root" elements that are not referenced by other documents ("root" elements that have no descendants) |
| 213 | - |
|
| 214 | 213 | * @param array $settings |
| 215 | 214 | * |
| 216 | 215 | * @return array |
@@ -50,8 +50,7 @@ discard block |
||
| 50 | 50 | * |
| 51 | 51 | * @return \Kitodo\Dlf\Domain\Model\Document|null |
| 52 | 52 | */ |
| 53 | - public function findOneByParameters($parameters) |
|
| 54 | - { |
|
| 53 | + public function findOneByParameters($parameters) { |
|
| 55 | 54 | $doc = null; |
| 56 | 55 | $document = null; |
| 57 | 56 | |
@@ -95,8 +94,7 @@ discard block |
||
| 95 | 94 | * |
| 96 | 95 | * @return \Kitodo\Dlf\Domain\Model\Document|null |
| 97 | 96 | */ |
| 98 | - public function findOldestDocument() |
|
| 99 | - { |
|
| 97 | + public function findOldestDocument() { |
|
| 100 | 98 | $query = $this->createQuery(); |
| 101 | 99 | |
| 102 | 100 | $query->setOrderings(['tstamp' => QueryInterface::ORDER_ASCENDING]); |
@@ -110,8 +108,7 @@ discard block |
||
| 110 | 108 | * @param \Kitodo\Dlf\Domain\Model\Structure $structure |
| 111 | 109 | * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface |
| 112 | 110 | */ |
| 113 | - public function getChildrenOfYearAnchor($partOf, $structure) |
|
| 114 | - { |
|
| 111 | + public function getChildrenOfYearAnchor($partOf, $structure) { |
|
| 115 | 112 | $query = $this->createQuery(); |
| 116 | 113 | |
| 117 | 114 | $query->matching($query->equals('structure', $structure)); |
@@ -132,8 +129,7 @@ discard block |
||
| 132 | 129 | * |
| 133 | 130 | * @return \Kitodo\Dlf\Domain\Model\Document|null |
| 134 | 131 | */ |
| 135 | - public function findOneByIdAndSettings($uid, $settings = []) |
|
| 136 | - { |
|
| 132 | + public function findOneByIdAndSettings($uid, $settings = []) { |
|
| 137 | 133 | $settings = ['documentSets' => $uid]; |
| 138 | 134 | |
| 139 | 135 | return $this->findDocumentsBySettings($settings)->getFirst(); |
@@ -146,8 +142,7 @@ discard block |
||
| 146 | 142 | * |
| 147 | 143 | * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface |
| 148 | 144 | */ |
| 149 | - public function findDocumentsBySettings($settings = []) |
|
| 150 | - { |
|
| 145 | + public function findDocumentsBySettings($settings = []) { |
|
| 151 | 146 | $query = $this->createQuery(); |
| 152 | 147 | |
| 153 | 148 | $constraints = []; |
@@ -177,8 +172,7 @@ discard block |
||
| 177 | 172 | * |
| 178 | 173 | * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface |
| 179 | 174 | */ |
| 180 | - public function findAllByCollectionsLimited($collections, $limit = 50) |
|
| 181 | - { |
|
| 175 | + public function findAllByCollectionsLimited($collections, $limit = 50) { |
|
| 182 | 176 | $query = $this->createQuery(); |
| 183 | 177 | |
| 184 | 178 | // order by start_date -> start_time... |
@@ -215,8 +209,7 @@ discard block |
||
| 215 | 209 | * |
| 216 | 210 | * @return array |
| 217 | 211 | */ |
| 218 | - public function getStatisticsForSelectedCollection($settings) |
|
| 219 | - { |
|
| 212 | + public function getStatisticsForSelectedCollection($settings) { |
|
| 220 | 213 | if ($settings['collections']) { |
| 221 | 214 | // Include only selected collections. |
| 222 | 215 | $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class) |
@@ -350,8 +343,7 @@ discard block |
||
| 350 | 343 | * |
| 351 | 344 | * @return \TYPO3\CMS\Extbase\Persistence\QueryResultInterface |
| 352 | 345 | */ |
| 353 | - public function getTableOfContentsFromDb($uid, $pid, $settings) |
|
| 354 | - { |
|
| 346 | + public function getTableOfContentsFromDb($uid, $pid, $settings) { |
|
| 355 | 347 | // Build table of contents from database. |
| 356 | 348 | $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class) |
| 357 | 349 | ->getQueryBuilderForTable('tx_dlf_documents'); |
@@ -399,8 +391,7 @@ discard block |
||
| 399 | 391 | * |
| 400 | 392 | * @return array The found document object |
| 401 | 393 | */ |
| 402 | - public function getOaiRecord($settings, $parameters) |
|
| 403 | - { |
|
| 394 | + public function getOaiRecord($settings, $parameters) { |
|
| 404 | 395 | $where = ''; |
| 405 | 396 | |
| 406 | 397 | if (!$settings['show_userdefined']) { |
@@ -440,8 +431,7 @@ discard block |
||
| 440 | 431 | * |
| 441 | 432 | * @return array The found document objects |
| 442 | 433 | */ |
| 443 | - public function getOaiDocumentList($settings, $documentsToProcess) |
|
| 444 | - { |
|
| 434 | + public function getOaiDocumentList($settings, $documentsToProcess) { |
|
| 445 | 435 | $connection = GeneralUtility::makeInstance(ConnectionPool::class) |
| 446 | 436 | ->getConnectionForTable('tx_dlf_documents'); |
| 447 | 437 | |
@@ -475,8 +465,7 @@ discard block |
||
| 475 | 465 | * |
| 476 | 466 | * @return array |
| 477 | 467 | */ |
| 478 | - private function findAllByUids($uids) |
|
| 479 | - { |
|
| 468 | + private function findAllByUids($uids) { |
|
| 480 | 469 | // get all documents from db we are talking about |
| 481 | 470 | $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class); |
| 482 | 471 | $queryBuilder = $connectionPool->getQueryBuilderForTable('tx_dlf_documents'); |
@@ -520,8 +509,7 @@ discard block |
||
| 520 | 509 | * @param \TYPO3\CMS\Extbase\Persistence\Generic\QueryResult $listedMetadata |
| 521 | 510 | * @return array |
| 522 | 511 | */ |
| 523 | - public function findSolrByCollection($collection, $settings, $searchParams, $listedMetadata = null) |
|
| 524 | - { |
|
| 512 | + public function findSolrByCollection($collection, $settings, $searchParams, $listedMetadata = null) { |
|
| 525 | 513 | // set settings global inside this repository |
| 526 | 514 | $this->settings = $settings; |
| 527 | 515 | |
@@ -730,8 +718,7 @@ discard block |
||
| 730 | 718 | * @param \TYPO3\CMS\Extbase\Persistence\Generic\QueryResult $listedMetadata |
| 731 | 719 | * @return array |
| 732 | 720 | */ |
| 733 | - protected function fetchMetadataFromSolr($uid, $listedMetadata = []) |
|
| 734 | - { |
|
| 721 | + protected function fetchMetadataFromSolr($uid, $listedMetadata = []) { |
|
| 735 | 722 | // Prepare query parameters. |
| 736 | 723 | $params = []; |
| 737 | 724 | $metadataArray = []; |
@@ -780,8 +767,7 @@ discard block |
||
| 780 | 767 | * |
| 781 | 768 | * @return array The Apache Solr Documents that were fetched |
| 782 | 769 | */ |
| 783 | - protected function searchSolr($parameters = [], $enableCache = true) |
|
| 784 | - { |
|
| 770 | + protected function searchSolr($parameters = [], $enableCache = true) { |
|
| 785 | 771 | // Set additional query parameters. |
| 786 | 772 | $parameters['start'] = 0; |
| 787 | 773 | // Set query. |