Is it possible to collapse custom code in PhpStorm? Like if you set in settings pattern:
[START]$this->debugOutput(*)[END]
The concept is to hide debug code after developing finished.
In example below all lines with $this->debugOutput
should be hidden
class Foo {
public function bar()
{
$x = 1 + 2;
$this->debugOutput($x);
$y = 3 + 3;
$z = 5 + 5;
$this->debugOutput($y);
$this->debugOutput($z);
}
public function debugOutput($msg, $dump = false)
{
if($this->config->debug !== true){
return;
}
@ob_end_flush();
@ob_flush();
@flush();
@ob_start();
if($dump){
var_dump($msg);
} else {
echo $msg . PHP_EOL;
}
}
}