Skip to content

Commit

Permalink
Merge pull request #441 from LimeSurvey/scrutinizer-patch-2
Browse files Browse the repository at this point in the history
Scrutinizer Auto-Fixes
  • Loading branch information
c-schmitz committed Feb 16, 2016
2 parents 6224bfb + 73e9930 commit 6b4c074
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 8 deletions.
6 changes: 6 additions & 0 deletions application/commands/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ public function run($sArgument)
));
}

/**
* @param string $sFileName
*/
function _executeSQLFile($sFileName)
{
echo $sFileName;
Expand Down Expand Up @@ -112,6 +115,9 @@ function _executeSQLFile($sFileName)

}

/**
* @param string $sProperty
*/
function getDBConnectionStringProperty($sProperty, $connectionString = null)
{
if (!isset($connectionString))
Expand Down
4 changes: 2 additions & 2 deletions application/controllers/admin/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -1323,8 +1323,8 @@ function index($sa = null)
* $defaultvalue is empty then the entry is removed from table defaultvalues
*
* @param mixed $qid Question ID
* @param mixed $scale_id Scale ID
* @param mixed $specialtype Special type (i.e. for 'Other')
* @param integer $scale_id Scale ID
* @param string $specialtype Special type (i.e. for 'Other')
* @param mixed $language Language (defaults are language specific)
* @param mixed $defaultvalue The default value itself
* @param boolean $ispost If defaultvalue is from a $_POST set this to true to properly quote things
Expand Down
6 changes: 2 additions & 4 deletions application/controllers/admin/dataentry.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ function __construct($controller, $id)
/**
* Function responsible for importing responses from file (.csv)
*
* @param mixed $surveyid
* @return void
*/
function vvimport()
Expand Down Expand Up @@ -243,7 +242,7 @@ private function _showUploadForm($aEncodings, $surveyid, $aData)
/**
* dataentry::import()
* Function responsible to import responses from old survey table(s).
* @param int $iSurveyId
* @param int $surveyid
* @return void
*/
public function import($surveyid)
Expand Down Expand Up @@ -397,7 +396,6 @@ public function import($surveyid)

/**
* Takes a list of tablenames and creates a nice key value array.
* @param type $list
*/
protected function tableList($tables)
{
Expand All @@ -418,7 +416,7 @@ protected function tableList($tables)
/**
* Takes a table schema and finds the field for some question id.
* @param CDbTableSchema $schema
* @param type $qid
* @param string $qid
* @return CDbColumnSchema
*/
protected function getQidColumn(CDbTableSchema $schema, $qid)
Expand Down
2 changes: 1 addition & 1 deletion application/controllers/admin/dumpdb.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function index()

/**
* Send the headers so that it is shown as a download
* @param string $sDbName Database Name
* @param string $sFileName
*/
private function _outputHeaders($sFileName)
{
Expand Down
10 changes: 9 additions & 1 deletion application/controllers/admin/export.php
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,11 @@ private function _exportarchive($iSurveyID, $bSendToBrowser=TRUE)
}
}

/**
* @param PclZip $zip
* @param string $name
* @param string $full_name
*/
private function _addToZip($zip, $name, $full_name)
{
$zip->add(
Expand Down Expand Up @@ -1205,6 +1210,9 @@ private function _exporttsv($surveyid)
return;
}

/**
* @param string $content_type
*/
private function _addHeaders($filename, $content_type, $expires, $pragma = "public")
{
header("Content-Type: {$content_type}; charset=UTF-8");
Expand All @@ -1227,7 +1235,7 @@ private function _xmlToJson($fileContents) {
* Renders template(s) wrapped in header and footer
*
* @param string $sAction Current action, the folder to fetch views from
* @param string|array $aViewUrls View url(s)
* @param string $aViewUrls View url(s)
* @param array $aData Data to be passed on. Optional.
*/
protected function _renderWrappedTemplate($sAction = 'export', $aViewUrls = array(), $aData = array())
Expand Down
4 changes: 4 additions & 0 deletions application/controllers/admin/printablesurvey.php
Original file line number Diff line number Diff line change
Expand Up @@ -1591,6 +1591,7 @@ function index($surveyid, $lang = null)
* keywords replaced by variables.
*
* How:
* @param string $template
*/
private function _populate_template( $template , $input , $line = '')
{
Expand Down Expand Up @@ -1660,6 +1661,9 @@ private function _min_max_answers_help($qidattributes, $sLanguageCode, $surveyid
}


/**
* @param string $type
*/
private function _input_type_image( $type , $title = '' , $x = 40 , $y = 1 , $line = '' )
{
if($type == 'other' or $type == 'othercomment')
Expand Down

0 comments on commit 6b4c074

Please sign in to comment.