Fix: PHPCS

This commit is contained in:
Laurent Destailleur 2014-12-05 20:12:32 +01:00
parent 5755a046c5
commit efe2719f48
5 changed files with 47 additions and 8 deletions

View File

@ -47,6 +47,14 @@ function SetXmlHeaders()
header('Content-Type: text/xml; charset=utf-8'); header('Content-Type: text/xml; charset=utf-8');
} }
/**
* CreateXmlHeader
*
* @param string $command Command
* @param string $resourceType Resource type
* @param string $currentFolder Current folder
* @return void
*/
function CreateXmlHeader( $command, $resourceType, $currentFolder ) function CreateXmlHeader( $command, $resourceType, $currentFolder )
{ {
SetXmlHeaders(); SetXmlHeaders();
@ -63,6 +71,11 @@ function CreateXmlHeader( $command, $resourceType, $currentFolder )
$GLOBALS['HeaderSent'] = true ; $GLOBALS['HeaderSent'] = true ;
} }
/**
* CreateXmlFooter
*
* @return void
*/
function CreateXmlFooter() function CreateXmlFooter()
{ {
echo '</Connector>' ; echo '</Connector>' ;

View File

@ -53,6 +53,13 @@ function GetFolders( $resourceType, $currentFolder )
echo "</Folders>" ; echo "</Folders>" ;
} }
/**
* GetFoldersAndFiles
*
* @param string $resourceType Resource type
* @param string $currentFolder Current folder
* @return void
*/
function GetFoldersAndFiles( $resourceType, $currentFolder ) function GetFoldersAndFiles( $resourceType, $currentFolder )
{ {
// Map the virtual path to the local server path. // Map the virtual path to the local server path.

View File

@ -35,6 +35,11 @@ if ( !$Config['Enabled'] )
DoResponse(); DoResponse();
/**
* DoResponse
*
* @return void
*/
function DoResponse() function DoResponse()
{ {
if (!isset($_GET)) { if (!isset($_GET)) {

View File

@ -115,11 +115,18 @@ function ServerMapFolder($resourceType, $folderPath, $sCommand)
return CombinePaths($sResourceTypePath, $folderPath); return CombinePaths($sResourceTypePath, $folderPath);
} }
/**
* GetParentFolder
*
* @param string $folderPath Folder path
* @return string Parent folder
*/
function GetParentFolder($folderPath) function GetParentFolder($folderPath)
{ {
$sPattern = "-[/\\\\][^/\\\\]+[/\\\\]?$-" ; $sPattern = "-[/\\\\][^/\\\\]+[/\\\\]?$-" ;
return preg_replace($sPattern, '', $folderPath); return preg_replace($sPattern, '', $folderPath);
} }
/** /**
* CreateServerFolder * CreateServerFolder
* *

View File

@ -27,6 +27,13 @@ require 'util.php';
require 'io.php'; require 'io.php';
require 'commands.php'; require 'commands.php';
/**
* SendError
*
* @param string $number Number
* @param string $text Text
* @return void
*/
function SendError($number, $text) function SendError($number, $text)
{ {
SendUploadResults($number, '', '', $text); SendUploadResults($number, '', '', $text);