Skip to content

Commit

Permalink
[MAINTENANCE] Fixes Phpmd CamelCaseMethodName warnings (#1049)
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Meyer <[email protected]>
  • Loading branch information
frank-ulrich-weber and sebastian-meyer authored Oct 23, 2023
1 parent 1f4a323 commit bc6252e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Classes/Common/MetsDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ protected function establishRecordId(int $pid): void
$hookObjects = Helper::getHookObjects('Classes/Common/MetsDocument.php');
// Apply hooks.
foreach ($hookObjects as $hookObj) {
if (method_exists($hookObj, 'construct_postProcessRecordId')) {
$hookObj->construct_postProcessRecordId($this->xml, $this->recordId);
if (method_exists($hookObj, 'postProcessRecordId')) {
$hookObj->postProcessRecordId($this->xml, $this->recordId);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/Common/Solr/Solr.php
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ protected function loadSolrConnectionInfo(): void
*
* @return array The Apache Solr Documents that were fetched
*/
public function search_raw(array $parameters = []): array
public function searchRaw(array $parameters = []): array
{
// Set additional query parameters.
$parameters['start'] = 0;
Expand Down
4 changes: 2 additions & 2 deletions Classes/Controller/CollectionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ public function listAction()
} else {
$params['query'] = $solr_query . ' AND partof:0 AND toplevel:true';
}
$partOfNothing = $solr->search_raw($params);
$partOfNothing = $solr->searchRaw($params);

$params['query'] = $solr_query . ' AND NOT partof:0 AND toplevel:true';
$partOfSomething = $solr->search_raw($params);
$partOfSomething = $solr->searchRaw($params);
// Titles are all documents that are "root" elements i.e. partof == 0
$collectionInfo['titles'] = [];
foreach ($partOfNothing as $doc) {
Expand Down
2 changes: 1 addition & 1 deletion Classes/Controller/OaiPmhController.php
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ protected function fetchDocumentUIDs()
]
];
$parameters['query'] = $solr_query;
$result = $solr->search_raw($parameters);
$result = $solr->searchRaw($parameters);
if (empty($result)) {
$this->error = 'noRecordsMatch';
return;
Expand Down
2 changes: 1 addition & 1 deletion Classes/Hooks/KitodoProductionHacks.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class KitodoProductionHacks
*
* @return void
*/
public function construct_postProcessRecordId(\SimpleXMLElement &$xml, &$recordId): void
public function postProcessRecordId(\SimpleXMLElement &$xml, &$recordId): void
{
if (!$recordId) {
$xml->registerXPathNamespace('mods', 'http://www.loc.gov/mods/v3');
Expand Down

0 comments on commit bc6252e

Please sign in to comment.