mirror of
https://github.com/manualdousuario/marreta.git
synced 2025-09-04 11:41:12 +00:00
remove a debug print, criar um testador eficiente no futuro
This commit is contained in:
parent
38e89e19b0
commit
b5bd84dbd7
1 changed files with 0 additions and 30 deletions
|
@ -1,30 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Classe responsável por impressão de debug
|
|
||||||
*/
|
|
||||||
class DebugPrinter {
|
|
||||||
/**
|
|
||||||
* Imprime uma variável de forma formatada apenas quando o DEBUG está ativo
|
|
||||||
*
|
|
||||||
* @param mixed $var Variável a ser impressa
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function prettyPrint($var) {
|
|
||||||
if (!defined('DEBUG') || !DEBUG) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$output = print_r($var, true);
|
|
||||||
|
|
||||||
echo "<pre style=\"
|
|
||||||
background-color: #f4f4f4;
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
border-radius: 4px;
|
|
||||||
padding: 15px;
|
|
||||||
font-family: monospace;
|
|
||||||
white-space: pre-wrap;
|
|
||||||
word-wrap: break-word;
|
|
||||||
\">" . $output . "</pre>";
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue