Skip to content

Commit

Permalink
PHPMD tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Jun 7, 2013
1 parent 4a6b790 commit 30ebd19
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
7 changes: 3 additions & 4 deletions classes/core/DataObject.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class DataObject {
/**
* Constructor.
*/
function DataObject($callHooks = true) {
function DataObject() {
}


Expand Down Expand Up @@ -354,13 +354,12 @@ function getMetadataFieldNames($translated = true) {
// Create a list of all possible meta-data field names
$metadataFieldNames = array();
$extractionAdapters =& $this->getSupportedExtractionAdapters();
foreach($extractionAdapters as $metadataSchemaName => $metadataAdapter) {
foreach($extractionAdapters as $metadataAdapter) {
// Add the field names from the current adapter
$metadataFieldNames = array_merge($metadataFieldNames,
$metadataAdapter->getDataObjectMetadataFieldNames($translated));
}
$metadataFieldNames = array_unique($metadataFieldNames);
return $metadataFieldNames;
return array_unique($metadataFieldNames);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion classes/core/PKPPageRouter.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ function route($request) {

if (!defined('SESSION_DISABLE_INIT')) {
// Initialize session
$sessionManager = SessionManager::getManager();
SessionManager::getManager();
}

// Call the selected handler's index operation if
Expand Down
4 changes: 2 additions & 2 deletions classes/core/RuntimeEnvironment.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ function isCompatible() {
$externalProgram = Config::getVar('cli', $requiredProgram);
if (!file_exists($externalProgram)) return false;
if (function_exists('is_executable')) {
if (!is_executable($filename)) return false;
if (!is_executable($externalProgram)) return false;
}
}

// Compatibility check was successful
return true;
}
}
?>
?>
2 changes: 1 addition & 1 deletion classes/core/String.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ static function strrpos($haystack, $needle) {
require_once './lib/pkp/lib/phputf8/utils/unicode.php';
require_once './lib/pkp/lib/phputf8/native/core.php';
}
return utf8_strrpos($haystack, $needle, $offset);
return utf8_strrpos($haystack, $needle);
}

/**
Expand Down

0 comments on commit 30ebd19

Please sign in to comment.