Skip to content

Commit

Permalink
#153 Coding style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
j3nsch committed Jan 17, 2023
1 parent c6ed037 commit d0658a3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion modules/admin/forms/Document/MultiIdentifierSubForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ public function processPost($data, $context)

// wenn nur noch ein Eingabefeld für Identifier des Typs übrig bleibt: Generieren-Button anzeigen
if (count($this->getSubForms()) === 1) {
$subforms = $this->getSubForms();
$subforms = $this->getSubForms();
$firstIdForm = reset($subforms); // TODO ERROR ?
$this->addGenerateButton($firstIdForm, false);
// TODO ohne den nachfolgenden Aufruf wird der Button nicht neben,
Expand Down
21 changes: 9 additions & 12 deletions modules/oai/models/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@
*/

use Opus\Common\Log;
use Opus\Common\Security\Realm;

/**
* TODO documentation is not existent - especially the fact that 'validate' functions are called dynamically
* TODO BUG documentation is not existent - especially the fact that 'validate' functions are called dynamically
*/
class Oai_Model_Request
{
Expand All @@ -45,11 +46,11 @@ class Oai_Model_Request
/** @var string */
private $errorMessage;

/* @var string
private $pathToMetadataPrefixFiles; */
/* @var string */
private $pathToMetadataPrefixFiles;

/** @var string
private $resumptionPath; */
/** @var string */
private $resumptionPath;

/** @var string[] */
private $validArguments = [
Expand Down Expand Up @@ -136,8 +137,7 @@ public function checkDate($datestr)
* TODO handling case insensitivity of metadataPrefix is spread through the code (here and other places)
* TODO function handles access control in addition to checking if format is supported (mixed responsibilities)
*/
/* TODO LAMINAS unused function
private function validateMetadataPrefix($oaiMetadataPrefix)
public function validateMetadataPrefix($oaiMetadataPrefix)
{
// we assuming that a metadata prefix file ends with xslt
$possibleFiles = glob($this->pathToMetadataPrefixFiles . DIRECTORY_SEPARATOR . '*.xslt');
Expand Down Expand Up @@ -165,7 +165,6 @@ private function validateMetadataPrefix($oaiMetadataPrefix)

return $result;
}
*/

/**
* Checks if given 'from' date is valid.
Expand Down Expand Up @@ -238,9 +237,8 @@ public function validateFromUntilRange($from, $until)
*
* @param string $oaiResumptionToken The resumption token to validate.
* @return bool
*
* TODO LAMINAS unused function
private function validateResumptionToken($oaiResumptionToken)
*/
public function validateResumptionToken($oaiResumptionToken)
{
$tokenWorker = new Oai_Model_Resumptiontokens();

Expand All @@ -264,7 +262,6 @@ private function validateResumptionToken($oaiResumptionToken)

return $result;
}
*/

/**
* Returns current error code.
Expand Down

0 comments on commit d0658a3

Please sign in to comment.