diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php
index f8b9556cf89..4a0d2f8e6bc 100644
--- a/htdocs/admin/company.php
+++ b/htdocs/admin/company.php
@@ -415,17 +415,17 @@ print '
| '.$langs->trans(
// Name
print ' |
|---|
| ';
-print 'global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '' : ' autofocus="autofocus"').'> |
'."\n";
+print 'global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '' : ' autofocus="autofocus"').'>'."\n";
// Address
print ' | ';
-print ' |
'."\n";
+print ''."\n";
print ' | ';
-print ' |
'."\n";
+print ''."\n";
print ' | ';
-print ' |
'."\n";
+print ''."\n";
// Country
print ' | ';
diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php
index 694b785e63c..601368f6632 100644
--- a/htdocs/core/class/dolgraph.class.php
+++ b/htdocs/core/class/dolgraph.class.php
@@ -898,90 +898,90 @@ class DolGraph
return;
}
- $legends=array();
- $nblot=0;
+ $legends = array();
+ $nblot = 0;
if (is_array($this->data) && is_array($this->data[0])) {
- $nblot=count($this->data[0])-1; // -1 to remove legend
+ $nblot = count($this->data[0]) - 1; // -1 to remove legend
}
if ($nblot < 0) dol_syslog('Bad value for property ->data. Must be set by mydolgraph->SetData before calling mydolgrapgh->draw', LOG_WARNING);
- $firstlot=0;
+ $firstlot = 0;
// Works with line but not with bars
//if ($nblot > 2) $firstlot = ($nblot - 2); // We limit nblot to 2 because jflot can't manage more than 2 bars on same x
- $i=$firstlot;
- $serie=array();
+ $i = $firstlot;
+ $serie = array();
while ($i < $nblot) // Loop on each serie
{
- $values=array(); // Array with horizontal y values (specific values of a serie) for each abscisse x
- $serie[$i]="var d".$i." = [];\n";
+ $values = array(); // Array with horizontal y values (specific values of a serie) for each abscisse x
+ $serie[$i] = "var d".$i." = [];\n";
// Fill array $values
- $x=0;
- foreach($this->data as $valarray) // Loop on each x
+ $x = 0;
+ foreach ($this->data as $valarray) // Loop on each x
{
$legends[$x] = $valarray[0];
- $values[$x] = (is_numeric($valarray[$i+1]) ? $valarray[$i+1] : null);
+ $values[$x] = (is_numeric($valarray[$i + 1]) ? $valarray[$i + 1] : null);
$x++;
}
// TODO Avoid push by adding generated long array...
if (isset($this->type[$firstlot]) && $this->type[$firstlot] == 'pie')
{
- foreach($values as $x => $y) {
- if (isset($y)) $serie[$i].='d'.$i.'.push({"label":"'.dol_escape_js($legends[$x]).'", "data":'.$y.'});'."\n";
+ foreach ($values as $x => $y) {
+ if (isset($y)) $serie[$i] .= 'd'.$i.'.push({"label":"'.dol_escape_js($legends[$x]).'", "data":'.$y.'});'."\n";
}
}
else
{
- foreach($values as $x => $y) {
- if (isset($y)) $serie[$i].='d'.$i.'.push(['.$x.', '.$y.']);'."\n";
+ foreach ($values as $x => $y) {
+ if (isset($y)) $serie[$i] .= 'd'.$i.'.push(['.$x.', '.$y.']);'."\n";
}
}
unset($values);
$i++;
}
- $tag=dol_escape_htmltag(dol_string_unaccent(dol_string_nospecial(basename($file), '_', array('-','.'))));
+ $tag = dol_escape_htmltag(dol_string_unaccent(dol_string_nospecial(basename($file), '_', array('-', '.'))));
- $this->stringtoshow =''."\n";
- if (! empty($this->title)) $this->stringtoshow.=' '.$this->title.' ';
- if (! empty($this->shownographyet))
+ $this->stringtoshow = ''."\n";
+ if (!empty($this->title)) $this->stringtoshow .= ''.$this->title.' ';
+ if (!empty($this->shownographyet))
{
- $this->stringtoshow.='';
- $this->stringtoshow.=''.$langs->trans("NotEnoughDataYet").' ';
+ $this->stringtoshow .= '';
+ $this->stringtoshow .= ''.$langs->trans("NotEnoughDataYet").' ';
return;
}
- $this->stringtoshow.=''."\n";
+ $this->stringtoshow .= ''."\n";
- $this->stringtoshow.=' |