@@ -39,7 +39,7 @@ |
||
| 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])) return $this->columnsMaxLenght[$columnIndex]; |
|
| 43 | 43 | $width = 0; |
| 44 | 44 | for ($y = 0; $y < $this->dimensionY; $y++) { |
| 45 | 45 | $len = strlen($this->getCell($columnIndex, $y)); |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | $this->metadata[$key] = $value; |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | - public function format(Table $table, $firstRowAsHeader = true){ |
|
| 23 | + public function format(Table $table, $firstRowAsHeader = true) { |
|
| 24 | 24 | $this->table = $table; |
| 25 | 25 | $str = ""; |
| 26 | 26 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | - for ($i = $firsRow; $i < $this->table->getDimensionY(); $i++){ |
|
| 43 | + for ($i = $firsRow; $i < $this->table->getDimensionY(); $i++) { |
|
| 44 | 44 | $str .= $this->line($i); |
| 45 | 45 | } |
| 46 | 46 | |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | private function line($rowIndex) { |
| 63 | 63 | $retStr = ""; |
| 64 | 64 | $delimiter = $this->metadata["BL"]; |
| 65 | - for ($i = 0; $i < $this->table->getDimensionX(); $i++){ |
|
| 65 | + for ($i = 0; $i < $this->table->getDimensionX(); $i++) { |
|
| 66 | 66 | $retStr .= $delimiter; |
| 67 | 67 | $cell = $this->table->getCell($i, $rowIndex); |
| 68 | 68 | $retStr .= " " . $cell . str_repeat(" ", $this->table->getColumnsMaxLenght($i) - strlen($cell)) . " "; |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | // Second row |
| 91 | 91 | $delimiter = $this->metadata["BL"]; |
| 92 | - for ($i = 0; $i < $this->table->getDimensionX(); $i++){ |
|
| 92 | + for ($i = 0; $i < $this->table->getDimensionX(); $i++) { |
|
| 93 | 93 | $retStr .= $delimiter; |
| 94 | 94 | $retStr .= " " . $this->table->getCell($i, 0) . " "; |
| 95 | 95 | } |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | |
| 98 | 98 | // Third row |
| 99 | 99 | $delimiter = $this->metadata["H2BL"]; |
| 100 | - for ($i = 0; $i < $this->table->getDimensionX(); $i++){ |
|
| 100 | + for ($i = 0; $i < $this->table->getDimensionX(); $i++) { |
|
| 101 | 101 | $columnLenght = $this->table->getColumnsMaxLenght($i) + 2; |
| 102 | 102 | $retStr .= $delimiter; |
| 103 | 103 | $retStr .= str_repeat($this->metadata["BPAD"], $columnLenght); |