for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace JeroenNoten\LaravelAdminLte\Components;
use Illuminate\View\Component;
class Alert extends Component
{
public $type, $title;
public $dismissable;
public function __construct($type = 'info', $dismissable = false, $title = 'Alert')
$this->type = $type;
$this->title = $title;
$this->dismissable = $dismissable;
}
public function icon()
switch($this->type)
case 'info' : return 'info' ; break;
break
The break statement is not necessary if it is preceded for example by a return statement:
return
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.
case
case 'warning' : return 'exclamation-triangle' ; break;
case 'success' : return 'check' ; break;
case 'danger' : return 'ban' ; break;
default : return 'exclamation'; break;
public function render()
return view('adminlte::alert');
The
break
statement is not necessary if it is preceded for example by areturn
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.