Merge pull request #4974 from Dolibarr/scrutinizer-patch-1
Scrutinizer Auto-Fixes
This commit is contained in:
commit
9695f5a536
@ -277,7 +277,7 @@ class AccountancyExport
|
||||
/**
|
||||
*
|
||||
* @param unknown $str data
|
||||
* @param unknown $size data
|
||||
* @param integer $size data
|
||||
*/
|
||||
public static function trunc($str, $size)
|
||||
{
|
||||
|
||||
@ -186,7 +186,7 @@ class CommandeApi extends DolibarrApi
|
||||
*
|
||||
* @url POST order/
|
||||
*
|
||||
* @return int ID of commande
|
||||
* @return string ID of commande
|
||||
*/
|
||||
function post($request_data = NULL)
|
||||
{
|
||||
|
||||
@ -52,8 +52,8 @@ class FormActions
|
||||
* @param string $selected Preselected value (-1..100)
|
||||
* @param int $canedit 1=can edit, 0=read only
|
||||
* @param string $htmlname Name of html prefix for html fields (selectX and valX)
|
||||
* @param string $showempty Show an empty line if select is used
|
||||
* @param string $onlyselect 0=Standard, 1=Hide percent of completion and force usage of a select list, 2=Same than 1 and add "Incomplete (Todo+Running)
|
||||
* @param integer $showempty Show an empty line if select is used
|
||||
* @param integer $onlyselect 0=Standard, 1=Hide percent of completion and force usage of a select list, 2=Same than 1 and add "Incomplete (Todo+Running)
|
||||
* @return void
|
||||
*/
|
||||
function form_select_status_action($formname,$selected,$canedit=1,$htmlname='complete',$showempty=0,$onlyselect=0)
|
||||
@ -246,7 +246,7 @@ class FormActions
|
||||
* @param string $selected Type pre-selected (can be 'manual', 'auto' or 'AC_xxx')
|
||||
* @param string $htmlname Name of select field
|
||||
* @param string $excludetype A type to exclude ('systemauto', 'system', '')
|
||||
* @param string $onlyautoornot 1=Group all type AC_XXX into 1 line AC_MANUAL. 0=Keep details of type
|
||||
* @param integer $onlyautoornot 1=Group all type AC_XXX into 1 line AC_MANUAL. 0=Keep details of type
|
||||
* @param int $hideinfohelp 1=Do not show info help, 0=Show, -1=Show+Add info to tell how to set default value
|
||||
* @param int $multiselect 1=Allow multiselect of action type
|
||||
* @return void
|
||||
|
||||
@ -64,9 +64,9 @@ class FormFile
|
||||
* @param int $size Length of input file area
|
||||
* @param Object $object Object to use (when attachment is done on an element)
|
||||
* @param string $options Add an option column
|
||||
* @param boolean $useajax Use fileupload ajax (0=never, 1=if enabled, 2=always whatever is option). 2 should never be used.
|
||||
* @param integer $useajax Use fileupload ajax (0=never, 1=if enabled, 2=always whatever is option). 2 should never be used.
|
||||
* @param string $savingdocmask Mask to use to define output filename. For example 'XXXXX-__YYYYMMDD__-__file__'
|
||||
* @param string $linkfiles 1=Also add form to link files, 0=Do not show form to link files
|
||||
* @param integer $linkfiles 1=Also add form to link files, 0=Do not show form to link files
|
||||
* @param string $htmlname Name and id of HTML form
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
@ -227,11 +227,11 @@ class FormFile
|
||||
* @param int $genallowed Generation is allowed (1/0 or array of formats)
|
||||
* @param int $delallowed Remove is allowed (1/0)
|
||||
* @param string $modelselected Model to preselect by default
|
||||
* @param string $allowgenifempty Show warning if no model activated
|
||||
* @param string $forcenomultilang Do not show language option (even if MAIN_MULTILANGS defined)
|
||||
* @param integer $allowgenifempty Show warning if no model activated
|
||||
* @param integer $forcenomultilang Do not show language option (even if MAIN_MULTILANGS defined)
|
||||
* @param int $iconPDF Show only PDF icon with link (1/0)
|
||||
* @param int $maxfilenamelength Max length for filename shown
|
||||
* @param string $noform Do not output html form tags
|
||||
* @param integer $noform Do not output html form tags
|
||||
* @param string $param More param on http links
|
||||
* @param string $title Title to show on top of form
|
||||
* @param string $buttonlabel Label on submit button
|
||||
@ -257,11 +257,11 @@ class FormFile
|
||||
* @param int $genallowed Generation is allowed (1/0 or array list of templates)
|
||||
* @param int $delallowed Remove is allowed (1/0)
|
||||
* @param string $modelselected Model to preselect by default
|
||||
* @param string $allowgenifempty Allow generation even if list of template ($genallowed) is empty (show however a warning)
|
||||
* @param string $forcenomultilang Do not show language option (even if MAIN_MULTILANGS defined)
|
||||
* @param integer $allowgenifempty Allow generation even if list of template ($genallowed) is empty (show however a warning)
|
||||
* @param integer $forcenomultilang Do not show language option (even if MAIN_MULTILANGS defined)
|
||||
* @param int $iconPDF Deprecated, see getDocumentsLink
|
||||
* @param int $maxfilenamelength Max length for filename shown
|
||||
* @param string $noform Do not output html form tags
|
||||
* @param integer $noform Do not output html form tags
|
||||
* @param string $param More param on http links
|
||||
* @param string $title Title to show on top of form
|
||||
* @param string $buttonlabel Label on submit button
|
||||
|
||||
@ -384,7 +384,7 @@ class SMTPs
|
||||
/**
|
||||
* Attempt mail server authentication for a secure connection
|
||||
*
|
||||
* @return mixed $_retVal Boolean indicating success or failure of authentication
|
||||
* @return boolean|null $_retVal Boolean indicating success or failure of authentication
|
||||
*/
|
||||
function _server_authenticate()
|
||||
{
|
||||
@ -441,7 +441,7 @@ class SMTPs
|
||||
*
|
||||
* @param boolean $_bolTestMsg whether to run this method in 'Test' mode.
|
||||
* @param boolean $_bolDebug whether to log all communication between this Class and the Mail Server.
|
||||
* @return mixed void
|
||||
* @return boolean|null void
|
||||
* $_strMsg If this is run in 'Test' mode, the actual message structure will be returned
|
||||
*/
|
||||
function sendMsg($_bolTestMsg = false, $_bolDebug = false)
|
||||
@ -541,7 +541,7 @@ class SMTPs
|
||||
* defined.
|
||||
*
|
||||
* @param mixed $_strConfigPath path to config file or VOID
|
||||
* @return void
|
||||
* @return boolean
|
||||
*/
|
||||
function setConfig($_strConfigPath = null)
|
||||
{
|
||||
@ -615,7 +615,7 @@ class SMTPs
|
||||
* Path to the sendmail execuable
|
||||
*
|
||||
* @param string $_path Path to the sendmail execuable
|
||||
* @return void
|
||||
* @return boolean
|
||||
*
|
||||
*/
|
||||
function setMailPath($_path)
|
||||
@ -1020,8 +1020,8 @@ class SMTPs
|
||||
/**
|
||||
* Returns an array of addresses for a specific type; TO, CC or BCC
|
||||
*
|
||||
* @param mixed $_which Which collection of adresses to return
|
||||
* @return array Array of emaill address
|
||||
* @param string $_which Which collection of adresses to return
|
||||
* @return string|false Array of emaill address
|
||||
*/
|
||||
function get_email_list($_which = null)
|
||||
{
|
||||
@ -1071,7 +1071,7 @@ class SMTPs
|
||||
/**
|
||||
* TO Address[es] inwhich to send mail to
|
||||
*
|
||||
* @param mixed $_addrTo TO Address[es] inwhich to send mail to
|
||||
* @param string $_addrTo TO Address[es] inwhich to send mail to
|
||||
* @return void
|
||||
*/
|
||||
function setTO($_addrTo)
|
||||
@ -1456,7 +1456,7 @@ class SMTPs
|
||||
* - [2] Private
|
||||
* - [3] Company Confidential
|
||||
*
|
||||
* @param string $_value Message Sensitivity
|
||||
* @param integer $_value Message Sensitivity
|
||||
* @return void
|
||||
*/
|
||||
function setSensitivity($_value = 0)
|
||||
@ -1491,7 +1491,7 @@ class SMTPs
|
||||
* - [4] 'Low'
|
||||
* - [5] 'Lowest'
|
||||
*
|
||||
* @param string $_value Message Priority
|
||||
* @param integer $_value Message Priority
|
||||
* @return void
|
||||
*/
|
||||
function setPriority ( $_value = 3 )
|
||||
@ -1511,7 +1511,7 @@ class SMTPs
|
||||
* - [4] 'Low'
|
||||
* - [5] 'Lowest'
|
||||
*
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
function getPriority()
|
||||
{
|
||||
@ -1534,7 +1534,7 @@ class SMTPs
|
||||
/**
|
||||
* Gets flag which determines whether to calculate message MD5 checksum.
|
||||
*
|
||||
* @return string Message Priority
|
||||
* @return boolean Message Priority
|
||||
*/
|
||||
function getMD5flag()
|
||||
{
|
||||
@ -1558,7 +1558,7 @@ class SMTPs
|
||||
/**
|
||||
* Retrieves the Message X-Header Content
|
||||
*
|
||||
* @return string $_msgContent Message X-Header Content
|
||||
* @return string[] $_msgContent Message X-Header Content
|
||||
*/
|
||||
function getXheader()
|
||||
{
|
||||
@ -1632,7 +1632,7 @@ class SMTPs
|
||||
* @param string $_strSend String to send
|
||||
* @param string $_returnCode Return code
|
||||
* @param string $CRLF CRLF
|
||||
* @return boolean True or false
|
||||
* @return boolean|null True or false
|
||||
*/
|
||||
function socket_send_str( $_strSend, $_returnCode = null, $CRLF = "\r\n" )
|
||||
{
|
||||
|
||||
@ -21,6 +21,10 @@
|
||||
*
|
||||
* This is the File Manager Connector for PHP.
|
||||
*/
|
||||
/**
|
||||
* @param string $sBasePath
|
||||
* @param string $sFolder
|
||||
*/
|
||||
function CombinePaths( $sBasePath, $sFolder )
|
||||
{
|
||||
return RemoveFromEnd($sBasePath, '/') . '/' . RemoveFromStart($sFolder, '/');
|
||||
@ -45,8 +49,8 @@ function GetResourceTypePath($resourceType, $sCommand)
|
||||
/**
|
||||
* GetResourceTypeDirectory
|
||||
*
|
||||
* @param unknown_type $resourceType Resource type
|
||||
* @param unknown_type $sCommand Command
|
||||
* @param string $resourceType Resource type
|
||||
* @param string $sCommand Command
|
||||
* @return string
|
||||
*/
|
||||
function GetResourceTypeDirectory($resourceType, $sCommand)
|
||||
@ -99,7 +103,7 @@ function RemoveExtension($fileName)
|
||||
* @param string $resourceType Resource type
|
||||
* @param string $folderPath Folder
|
||||
* @param string $sCommand Command
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
function ServerMapFolder($resourceType, $folderPath, $sCommand)
|
||||
{
|
||||
@ -380,6 +384,10 @@ EOF;
|
||||
// DOL_CHANGE
|
||||
|
||||
// This is the function that sends the results of the uploading process to CKE.
|
||||
/**
|
||||
* @param string $callback
|
||||
* @param string $sFileUrl
|
||||
*/
|
||||
function SendCKEditorResults ($callback, $sFileUrl, $customMsg = '')
|
||||
{
|
||||
echo '<script type="text/javascript">';
|
||||
|
||||
@ -109,6 +109,11 @@ function dolNumberToWord($numero, $langs, $numorcurrency='number')
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param integer $hundreds
|
||||
* @param integer $tens
|
||||
* @param integer $units
|
||||
*/
|
||||
function hundreds2text ($hundreds, $tens, $units){
|
||||
if ($hundreds==1 && $tens==0 && $units==0){
|
||||
return "CIEN";
|
||||
|
||||
@ -110,7 +110,7 @@ function member_prepare_head(Adherent $object)
|
||||
/**
|
||||
* Return array head with list of tabs to view object informations
|
||||
*
|
||||
* @param Adherent $object Member
|
||||
* @param AdherentType $object Member
|
||||
* @return array head
|
||||
*/
|
||||
function member_type_prepare_head(AdherentType $object)
|
||||
|
||||
@ -1628,7 +1628,7 @@ function pdf_getlineqty_keeptoship($object,$i,$outputlangs,$hidedetails=0)
|
||||
* @param Translate $outputlangs Object langs for output
|
||||
* @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines)
|
||||
* @param HookManager $hookmanager Hook manager instance
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
function pdf_getlineunit($object, $i, $outputlangs, $hidedetails = 0, $hookmanager = false)
|
||||
{
|
||||
|
||||
@ -146,7 +146,7 @@ abstract class ModelNumRefExpedition
|
||||
* Create a document onto disk according to template module.
|
||||
*
|
||||
* @param DoliDB $db Objet base de donnee
|
||||
* @param Object $object Object expedition
|
||||
* @param Expedition $object Object expedition
|
||||
* @param string $modele Force le modele a utiliser ('' to not force)
|
||||
* @param Translate $outputlangs Objet lang a utiliser pour traduction
|
||||
* @param int $hidedetails Hide details of lines
|
||||
|
||||
@ -63,7 +63,7 @@ class mailing_fraise extends MailingTargets
|
||||
* array of SQL request that returns two field:
|
||||
* One called "label", One called "nb".
|
||||
*
|
||||
* @return array Array with SQL requests
|
||||
* @return string[] Array with SQL requests
|
||||
*/
|
||||
function getSqlArrayForStats()
|
||||
{
|
||||
|
||||
@ -25,7 +25,6 @@
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/modules/printing/modules_printing.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php';
|
||||
use OAuth\Common\Storage\Session;
|
||||
use OAuth\Common\Storage\DoliStorage;
|
||||
use OAuth\Common\Consumer\Credentials;
|
||||
use OAuth\OAuth2\Service\Google;
|
||||
|
||||
@ -549,7 +549,7 @@ class pdf_beluga extends ModelePDFProjects
|
||||
* Show top header of page.
|
||||
*
|
||||
* @param PDF $pdf Object PDF
|
||||
* @param Object $object Object to show
|
||||
* @param Project $object Object to show
|
||||
* @param int $showaddress 0=no, 1=yes
|
||||
* @param Translate $outputlangs Object lang for output
|
||||
* @return void
|
||||
@ -611,10 +611,10 @@ class pdf_beluga extends ModelePDFProjects
|
||||
* Show footer of page. Need this->emetteur object
|
||||
*
|
||||
* @param PDF $pdf PDF
|
||||
* @param Object $object Object to show
|
||||
* @param Project $object Object to show
|
||||
* @param Translate $outputlangs Object lang for output
|
||||
* @param int $hidefreetext 1=Hide free text
|
||||
* @return void
|
||||
* @return integer
|
||||
*/
|
||||
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
|
||||
{
|
||||
|
||||
@ -70,7 +70,7 @@ class mod_syslog_sentry extends LogHandler implements LogHandlerInterface
|
||||
/**
|
||||
* Is the module active ?
|
||||
*
|
||||
* @return int
|
||||
* @return boolean
|
||||
*/
|
||||
public function isActive()
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user