Showing 34 of 34 total issues
Method render
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render()
{
if ($this->br === null) {
if ($this->align == 'left') {
$styles[] = "float: left";
Method render
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render()
{
$qrcode = new \Endroid\QrCode\QrCode();
$qrcode->setErrorCorrectionLevel(ErrorCorrectionLevel::HIGH);
$qrcode->setEncoding('UTF-8');
Method render
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render($side = null, $margin = false)
{
$this->content = "";
if (!empty($side)) {
Function render
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function render()
{
$qrcode = new \Endroid\QrCode\QrCode();
$qrcode->setErrorCorrectionLevel(ErrorCorrectionLevel::HIGH);
$qrcode->setEncoding('UTF-8');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function render
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function render($side = null, $margin = false)
{
$this->content = "";
if (!empty($side)) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function render
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function render()
{
$this->content = "";
$rows = ceil($this->tags->count()/$this->columns);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function render
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function render()
{
if ($this->width !== null) {
$styles[] = "width: {$this->width}mm";
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function render
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function render()
{
if ($this->br === null) {
if ($this->align == 'left') {
$styles[] = "float: left";
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Avoid too many return
statements within this method. Open
return "<img ".$style." src='data:image/png;base64,".base64_encode($barcode->getBarcode($this->content, $barcode::TYPE_EAN_5, $this->width, $this->height))."'>".$this->br;
Avoid too many return
statements within this method. Open
return "<img ".$style." src='data:image/png;base64,".base64_encode($barcode->getBarcode($this->content, $barcode::TYPE_EAN_8, $this->width, $this->height))."'>".$this->br;
Avoid too many return
statements within this method. Open
return "<img ".$style." src='data:image/png;base64,".base64_encode($barcode->getBarcode($this->content, $barcode::TYPE_MSI, $this->width, $this->height))."'>".$this->br;
Avoid too many return
statements within this method. Open
return "<img ".$style." src='data:image/png;base64,".base64_encode($barcode->getBarcode($this->content, $barcode::TYPE_CODE_128_B, $this->width, $this->height))."'>".$this->br;
Avoid too many return
statements within this method. Open
return "<img ".$style." src='data:image/png;base64,".base64_encode($barcode->getBarcode($this->content, $barcode::TYPE_PHARMA_CODE, $this->width, $this->height))."'>".$this->br;
Avoid too many return
statements within this method. Open
return "<img ".$style." src='data:image/png;base64,".base64_encode($barcode->getBarcode($this->content, $barcode::TYPE_MSI_CHECKSUM, $this->width, $this->height))."'>".$this->br;
Avoid too many return
statements within this method. Open
return "<img ".$style." src='data:image/png;base64,".base64_encode($barcode->getBarcode($this->content, $barcode::TYPE_CODE_11, $this->width, $this->height))."'>".$this->br;
Avoid too many return
statements within this method. Open
return "<img ".$style." src='data:image/png;base64,".base64_encode($barcode->getBarcode($this->content, $barcode::TYPE_PHARMA_CODE_TWO_TRACKS, $this->width, $this->height))."'>".$this->br;
Avoid too many return
statements within this method. Open
return "<img ".$style." src='data:image/png;base64,".base64_encode($barcode->getBarcode($this->content, $barcode::TYPE_CODE_128_C, $this->width, $this->height))."'>".$this->br;
Avoid too many return
statements within this method. Open
return "<img ".$style." src='data:image/png;base64,".base64_encode($barcode->getBarcode($this->content, $barcode::TYPE_IMB, $this->width, $this->height))."'>".$this->br;
Avoid too many return
statements within this method. Open
return "<img ".$style." src='data:image/png;base64,".base64_encode($barcode->getBarcode($this->content, $barcode::TYPE_RMS4CC, $this->width, $this->height))."'>".$this->br;
Avoid too many return
statements within this method. Open
return "<img ".$style." src='data:image/png;base64,".base64_encode($barcode->getBarcode($this->content, $barcode::TYPE_STANDARD_2_5_CHECKSUM, $this->width, $this->height))."'>".$this->br;