2
0
forked from Wavyzz/dolibarr

Fix: A cast statement must be followed by a single space

This commit is contained in:
Regis Houssin
2011-09-20 12:29:00 +00:00
parent 5799323ec8
commit a9ac675393
6 changed files with 9 additions and 9 deletions

View File

@@ -151,7 +151,7 @@ if ($action=='show_week')
$week = $prev['week']; $week = $prev['week'];
$day =(int)$day; $day = (int) $day;
$next = dol_get_next_week($day, $week, $month, $year); $next = dol_get_next_week($day, $week, $month, $year);
$next_year = $next['year']; $next_year = $next['year'];
$next_month = $next['month']; $next_month = $next['month'];
@@ -165,7 +165,7 @@ if ($action=='show_week')
$tmpday = $first_day; $tmpday = $first_day;
} }
if ($action=='show_day') if ($action == 'show_day')
{ {
$prev = dol_get_prev_day($day, $month, $year); $prev = dol_get_prev_day($day, $month, $year);
$prev_year = $prev['year']; $prev_year = $prev['year'];

View File

@@ -741,12 +741,12 @@ class FormFile
$post_max_size = ini_get('post_max_size'); $post_max_size = ini_get('post_max_size');
$mul_post_max_size = substr($post_max_size, -1); $mul_post_max_size = substr($post_max_size, -1);
$mul_post_max_size = ($mul_post_max_size == 'M' ? 1048576 : ($mul_post_max_size == 'K' ? 1024 : ($mul_post_max_size == 'G' ? 1073741824 : 1))); $mul_post_max_size = ($mul_post_max_size == 'M' ? 1048576 : ($mul_post_max_size == 'K' ? 1024 : ($mul_post_max_size == 'G' ? 1073741824 : 1)));
$post_max_size = $mul_post_max_size*(int)$post_max_size; $post_max_size = $mul_post_max_size * (int) $post_max_size;
// PHP upload_max_filesize // PHP upload_max_filesize
$upload_max_filesize = ini_get('upload_max_filesize'); $upload_max_filesize = ini_get('upload_max_filesize');
$mul_upload_max_filesize = substr($upload_max_filesize, -1); $mul_upload_max_filesize = substr($upload_max_filesize, -1);
$mul_upload_max_filesize = ($mul_upload_max_filesize == 'M' ? 1048576 : ($mul_upload_max_filesize == 'K' ? 1024 : ($mul_upload_max_filesize == 'G' ? 1073741824 : 1))); $mul_upload_max_filesize = ($mul_upload_max_filesize == 'M' ? 1048576 : ($mul_upload_max_filesize == 'K' ? 1024 : ($mul_upload_max_filesize == 'G' ? 1073741824 : 1)));
$upload_max_filesize = $mul_upload_max_filesize*(int)$upload_max_filesize; $upload_max_filesize = $mul_upload_max_filesize * (int) $upload_max_filesize;
// Max file size // Max file size
$max_file_size = (($post_max_size < $upload_max_filesize) ? $post_max_size : $upload_max_filesize); $max_file_size = (($post_max_size < $upload_max_filesize) ? $post_max_size : $upload_max_filesize);

View File

@@ -601,7 +601,7 @@ function xml2php($xml)
//To deal with the attributes //To deal with the attributes
foreach($value->attributes() as $ak=>$av) foreach($value->attributes() as $ak=>$av)
{ {
$child[$ak] = (string)$av; $child[$ak] = (string) $av;
} }
@@ -632,7 +632,7 @@ function xml2php($xml)
if($fils==0) if($fils==0)
{ {
return (string)$xml; return (string) $xml;
} }
return $array; return $array;

View File

@@ -270,7 +270,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
// dans le tableau tva["taux"]=total_tva // dans le tableau tva["taux"]=total_tva
$tvaligne=$object->lines[$i]->price * $object->lines[$i]->qty; $tvaligne=$object->lines[$i]->price * $object->lines[$i]->qty;
if ($object->remise_percent) $tvaligne-=($tvaligne*$object->remise_percent)/100; if ($object->remise_percent) $tvaligne-=($tvaligne*$object->remise_percent)/100;
$this->tva[ (string)$object->lines[$i]->tva_tx ] += $tvaligne; $this->tva[ (string) $object->lines[$i]->tva_tx ] += $tvaligne;
*/ */
$nexY+=2; // Passe espace entre les lignes $nexY+=2; // Passe espace entre les lignes

View File

@@ -3662,7 +3662,7 @@ function dol_nboflines_bis($text,$maxlinesize=0,$charset='UTF-8')
function dol_microtime_float() function dol_microtime_float()
{ {
list($usec, $sec) = explode(" ", microtime()); list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec); return ((float) $usec + (float) $sec);
} }
/** /**

View File

@@ -36,7 +36,7 @@ $micro_start_time=0;
if (! empty($_SERVER['DOL_TUNING'])) if (! empty($_SERVER['DOL_TUNING']))
{ {
list($usec, $sec) = explode(" ", microtime()); list($usec, $sec) = explode(" ", microtime());
$micro_start_time=((float)$usec + (float)$sec); $micro_start_time=((float) $usec + (float) $sec);
// Add Xdebug code coverage // Add Xdebug code coverage
//define('XDEBUGCOVERAGE',1); //define('XDEBUGCOVERAGE',1);
if (defined('XDEBUGCOVERAGE')) { xdebug_start_code_coverage(); } if (defined('XDEBUGCOVERAGE')) { xdebug_start_code_coverage(); }