Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function display($formatter = null, $width = 150, $height = 150) |
||
27 | { |
||
28 | $this->addScript(); |
||
29 | |||
30 | $content = $this->getColumn()->getOriginal(); |
||
31 | |||
32 | if ($formatter instanceof \Closure) { |
||
33 | $content = call_user_func($formatter, $content, $this->row); |
||
34 | } |
||
35 | |||
36 | $img = "<img src='https://api.qrserver.com/v1/create-qr-code/?size={$width}x{$height}&data={$content}' style='height: {$width}px;width: {$height}px;'/>"; |
||
37 | |||
38 | return <<<HTML |
||
39 | <a href="javascript:void(0);" class="grid-column-qrcode text-muted" data-content="{$img}" data-toggle='popover' tabindex='0'> |
||
40 | <i class="fa fa-qrcode"></i> |
||
41 | </a> {$this->getValue()} |
||
42 | HTML; |
||
43 | HTML; |
||
|
|||
44 | } |
||
45 | } |
This check looks for unreachable code. It uses sophisticated control flow analysis techniques to find statements which will never be executed.
Unreachable code is most often the result of
return
,die
orexit
statements that have been added for debug purposes.In the above example, the last
return false
will never be executed, because a return statement has already been met in every possible execution path.