for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace pbk83\SimpleTable;
/**
* Class for creating a simple html - table
*
*/
class CSimpleTable
{
private $headings;
private $rows = array();
public function __construct($options = [])
$options
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
}
public function addRow($row)
$this->rows[] = $row;
public function addHeadings($head)
$this->headings = $head;
public function createTable()
$html =
'<table style="width:100%;border: 1px solid black;border-collapse: collapse;">
<tr>';
foreach($this->headings as $h)
$html .= '<th style="border: 1px solid black;border-collapse: collapse;">'.$h.'</th>';
$html .= '</tr>';
foreach($this->rows as $row)
$html .= '<tr>';
foreach($row as $r)
$html .= '<td style="border: 1px solid black;border-collapse: collapse;">' . $r . '</td>';
$html .= '</table>';
return $html;
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.