Missing class import via use statement (line '167', column '20'). Open
$pdf = new PDF($params['format'], $params['orientation'], $params);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '180', column '20'). Open
$pdf = new PDF($params['format'], $params['orientation'], $params);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '196', column '22'). Open
$table = new HTML_Table(['class' => 'table table-hover table-striped data_table', 'repeat_header' => '1']);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Avoid unused parameters such as '$format'. Open
public static function htmlToOdt($html, $name, $format = 'odt')
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$name'. Open
public static function htmlToOdt($html, $name, $format = 'odt')
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
The parameter $item_tagname is not named in camelCase. Open
public static function arrayToXml(
$data,
$filename = 'export',
$item_tagname = 'item',
$wrapper_tagname = null,
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $wrapper_tagname is not named in camelCase. Open
public static function arrayToXml(
$data,
$filename = 'export',
$item_tagname = 'item',
$wrapper_tagname = null,
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Missing parameter name Open
* @param string Name of common tag to place each line in
- Exclude checks
Variable "printable_data_row" is not in valid camel caps format Open
foreach ($data as &$printable_data_row) {
- Exclude checks
Variable "wrapper_tagname" is not in valid camel caps format Open
$wrapper_tagname = null,
- Exclude checks
Variable "wrapper_tagname" is not in valid camel caps format Open
if (!is_null($wrapper_tagname)) {
- Exclude checks
Variable "printable_data_cell" is not in valid camel caps format Open
foreach ($printable_data_row as &$printable_data_cell) {
- Exclude checks
Method name "Export::export_table_pdf" is not in camel caps format Open
public static function export_table_pdf($data, $params = [])
- Exclude checks
Variable "table_html" is not in valid camel caps format Open
$pdf->html_to_pdf_with_template($table_html);
- Exclude checks
Variable "header_attributes" is not in valid camel caps format Open
if (isset($header_attributes) && isset($header_attributes[$column])) {
- Exclude checks
Variable "item_tagname" is not in valid camel caps format Open
$item_tagname = 'item',
- Exclude checks
Method name "Export::export_html_to_pdf" is not in camel caps format Open
public static function export_html_to_pdf($html, $params = [])
- Exclude checks
Variable "printable_data_row" is not in valid camel caps format Open
foreach ($printable_data_row as &$printable_data_cell) {
- Exclude checks
Variable "table_html" is not in valid camel caps format Open
$table_html = self::convert_array_to_html($data, $params);
- Exclude checks
Variable "wrapper_tagname" is not in valid camel caps format Open
fwrite($handle, "\t".'<'.$wrapper_tagname.'>'."\n");
- Exclude checks
Variable "item_tagname" is not in valid camel caps format Open
fwrite($handle, "\t".'</'.$item_tagname.'>'."\n");
- Exclude checks
Variable "wrapper_tagname" is not in valid camel caps format Open
fwrite($handle, '</'.$wrapper_tagname.'>'."\n");
- Exclude checks
Variable "item_tagname" is not in valid camel caps format Open
fwrite($handle, '<'.$item_tagname.'>'."\n");
- Exclude checks
Method name "Export::convert_array_to_html" is not in camel caps format Open
public static function convert_array_to_html($data, $params = [])
- Exclude checks
Missing parameter name Open
* @param string Name of file to be given to the user
- Exclude checks
Variable "wrapper_tagname" is not in valid camel caps format Open
if (!is_null($wrapper_tagname)) {
- Exclude checks
Method name "Export::export_table_xls_html" is not in camel caps format Open
public static function export_table_xls_html($data, $filename = 'export', $encoding = 'utf-8')
- Exclude checks
Missing parameter name Open
* @param array Simple array of data to put in XML
- Exclude checks
Variable "header_attributes" is not in valid camel caps format Open
$attributes = $header_attributes[$column];
- Exclude checks
Missing parameter name Open
* @param string Name of the root element. A root element should always be given.
- Exclude checks
Missing parameter name Open
* @param string Encoding in which the data is provided
- Exclude checks
Variable "header_attributes" is not in valid camel caps format Open
$header_attributes = isset($params['header_attributes']) ? $params['header_attributes'] : [];
- Exclude checks
Variable "printable_data_cell" is not in valid camel caps format Open
$table->setCellContents($row, $column, $printable_data_cell);
- Exclude checks
Variable "header_attributes" is not in valid camel caps format Open
if (isset($header_attributes) && isset($header_attributes[$column])) {
- Exclude checks
The variable $printable_data_cell is not named in camelCase. Open
public static function convert_array_to_html($data, $params = [])
{
$headers = $data[0];
unset($data[0]);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $wrapper_tagname is not named in camelCase. Open
public static function arrayToXml(
$data,
$filename = 'export',
$item_tagname = 'item',
$wrapper_tagname = null,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $wrapper_tagname is not named in camelCase. Open
public static function arrayToXml(
$data,
$filename = 'export',
$item_tagname = 'item',
$wrapper_tagname = null,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $item_tagname is not named in camelCase. Open
public static function arrayToXml(
$data,
$filename = 'export',
$item_tagname = 'item',
$wrapper_tagname = null,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $printable_data_row is not named in camelCase. Open
public static function convert_array_to_html($data, $params = [])
{
$headers = $data[0];
unset($data[0]);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $printable_data_row is not named in camelCase. Open
public static function convert_array_to_html($data, $params = [])
{
$headers = $data[0];
unset($data[0]);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $header_attributes is not named in camelCase. Open
public static function convert_array_to_html($data, $params = [])
{
$headers = $data[0];
unset($data[0]);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $header_attributes is not named in camelCase. Open
public static function convert_array_to_html($data, $params = [])
{
$headers = $data[0];
unset($data[0]);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $wrapper_tagname is not named in camelCase. Open
public static function arrayToXml(
$data,
$filename = 'export',
$item_tagname = 'item',
$wrapper_tagname = null,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $item_tagname is not named in camelCase. Open
public static function arrayToXml(
$data,
$filename = 'export',
$item_tagname = 'item',
$wrapper_tagname = null,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $header_attributes is not named in camelCase. Open
public static function convert_array_to_html($data, $params = [])
{
$headers = $data[0];
unset($data[0]);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $table_html is not named in camelCase. Open
public static function export_table_pdf($data, $params = [])
{
$table_html = self::convert_array_to_html($data, $params);
$params['format'] = isset($params['format']) ? $params['format'] : 'A4';
$params['orientation'] = isset($params['orientation']) ? $params['orientation'] : 'P';
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $table_html is not named in camelCase. Open
public static function export_table_pdf($data, $params = [])
{
$table_html = self::convert_array_to_html($data, $params);
$params['format'] = isset($params['format']) ? $params['format'] : 'A4';
$params['orientation'] = isset($params['orientation']) ? $params['orientation'] : 'P';
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $header_attributes is not named in camelCase. Open
public static function convert_array_to_html($data, $params = [])
{
$headers = $data[0];
unset($data[0]);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $wrapper_tagname is not named in camelCase. Open
public static function arrayToXml(
$data,
$filename = 'export',
$item_tagname = 'item',
$wrapper_tagname = null,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $printable_data_cell is not named in camelCase. Open
public static function convert_array_to_html($data, $params = [])
{
$headers = $data[0];
unset($data[0]);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The method export_html_to_pdf is not named in camelCase. Open
public static function export_html_to_pdf($html, $params = [])
{
$params['format'] = isset($params['format']) ? $params['format'] : 'A4';
$params['orientation'] = isset($params['orientation']) ? $params['orientation'] : 'P';
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method convert_array_to_html is not named in camelCase. Open
public static function convert_array_to_html($data, $params = [])
{
$headers = $data[0];
unset($data[0]);
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method export_table_xls_html is not named in camelCase. Open
public static function export_table_xls_html($data, $filename = 'export', $encoding = 'utf-8')
{
$file = api_get_path(SYS_ARCHIVE_PATH).uniqid('').'.xls';
$handle = fopen($file, 'a+');
$systemEncoding = api_get_system_encoding();
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method export_table_pdf is not named in camelCase. Open
public static function export_table_pdf($data, $params = [])
{
$table_html = self::convert_array_to_html($data, $params);
$params['format'] = isset($params['format']) ? $params['format'] : 'A4';
$params['orientation'] = isset($params['orientation']) ? $params['orientation'] : 'P';
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}