for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
include 'Markdown/markdown.php';
class Ajde_Component_Markdown extends Ajde_Component
{
public static function processStatic(Ajde_Template_Parser $parser, $attributes)
$instance = new self($parser, $attributes);
return $instance->process();
}
protected function _init()
return [
'text' => 'toHtml',
];
public function process()
switch ($this->_attributeParse()) {
case 'toHtml':
$text = $this->attributes['text'];
return Markdown($text);
break;
break
The break statement is not necessary if it is preceded for example by a return statement:
switch ($x) { case 1: return 'foo'; break; // This break is not necessary and can be left off. }
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive.
// TODO:
throw new Ajde_Component_Exception('Missing required attributes for component call');
The break statement is not necessary if it is preceded for example by a return statement:
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive.