format
[PHP-P10.git] / Tools / Table.class.php
index 239de460afa3180b09b53d79a9183bd099230d64..761c59c8b74a42e001d6cd51a2d624585521ed36 100644 (file)
@@ -6,7 +6,7 @@
  * it under the terms of the GNU General Public License as published by *
  * the Free Software Foundation, either version 3 of the License, or    *
  * (at your option) any later version.                                  *
- *                                                                      * 
+ *                                                                      *
  * This program is distributed in the hope that it will be useful,      *
  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
@@ -16,7 +16,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>. *
  *                                                                      *
  ************************************************************************
- * 
+ *
  * Tools/Table.class.php
  *
  *  IRC Table Class
@@ -24,7 +24,7 @@
 
 class Table {
        private $table;
-       
+
        public function Table($colums) {
                $this->table = array();
                $this->table['set'] = array();
@@ -36,11 +36,11 @@ class Table {
                        $this->table['set']['bold'][$i] = false;
                }
        }
-       
+
        public function setBold($colum) {
                $this->table['set']['bold'][$colum] = true;
        }
-       
+
        public function add() {
                $args = func_get_args();
                $row = array();
@@ -48,12 +48,12 @@ class Table {
                        if(count($args) <= $i) $args[$i]= "";
                        $row[] = $args[$i];
                        if(count($args) >= $i)
-                               if(strlen($args[$i]) > $this->table['set']['max'.$i]) $this->table['set']['max'.$i] = strlen($args[$i]);
+                       if(strlen($args[$i]) > $this->table['set']['max'.$i]) $this->table['set']['max'.$i] = strlen($args[$i]);
                }
                $this->table['data'][] = $row;
                return true;
        }
-       
+
        public function end() {
                $space = "                                                                                       ";
                $output = array();
@@ -61,7 +61,7 @@ class Table {
                        $out = "";
                        for($i = 0; $i < $this->table['set']['col']; $i++) {
                                if($i < $this->table['set']['col'] - 1)
-                                       $this->table['data'][$row][$i] .= substr($space,0,$this->table['set']['max'.$i] - strlen($this->table['data'][$row][$i]) + 1);
+                               $this->table['data'][$row][$i] .= substr($space,0,$this->table['set']['max'.$i] - strlen($this->table['data'][$row][$i]) + 1);
                                $bold = $this->table['set']['bold'][$i];
                                $out .= ($bold ? "\002" : "").$this->table['data'][$row][$i].($bold ? "\002" : "");
                        }
@@ -69,7 +69,7 @@ class Table {
                }
                return $output;
        }
-       
+
 }
 
 ?>
\ No newline at end of file