@@ -21,7 +21,9 @@ |
||
21 | 21 | $cols = explode("\t", $row); |
22 | 22 | $ret_row = []; |
23 | 23 | $cnt = count($cols); |
24 | - if ($cnt > $x) $x = $cnt; |
|
24 | + if ($cnt > $x) { |
|
25 | + $x = $cnt; |
|
26 | + } |
|
25 | 27 | foreach ($cols as $col) { |
26 | 28 | $ret_row[] = $col; |
27 | 29 | } |
@@ -39,11 +39,15 @@ discard block |
||
39 | 39 | */ |
40 | 40 | public function getColumnsMaxLenght($columnIndex) |
41 | 41 | { |
42 | - if(isset($this->columnsMaxLenght[$columnIndex])) return $this->columnsMaxLenght[$columnIndex]; |
|
42 | + if(isset($this->columnsMaxLenght[$columnIndex])) { |
|
43 | + return $this->columnsMaxLenght[$columnIndex]; |
|
44 | + } |
|
43 | 45 | $width = 0; |
44 | 46 | for ($y = 0; $y < $this->dimensionY; $y++) { |
45 | 47 | $len = strlen($this->getCell($columnIndex, $y)); |
46 | - if ($len > $width) $width = $len; |
|
48 | + if ($len > $width) { |
|
49 | + $width = $len; |
|
50 | + } |
|
47 | 51 | } |
48 | 52 | |
49 | 53 | $this->columnsMaxLenght[$columnIndex] = $width; |
@@ -64,7 +68,9 @@ discard block |
||
64 | 68 | |
65 | 69 | foreach ($this->data as $row) { |
66 | 70 | $cnt = count($row); |
67 | - if ($cnt > $this->dimensionX) $this->dimensionX = $cnt; |
|
71 | + if ($cnt > $this->dimensionX) { |
|
72 | + $this->dimensionX = $cnt; |
|
73 | + } |
|
68 | 74 | } |
69 | 75 | $this->dimensionY = count($this->data); |
70 | 76 | } |