for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace NFePHP\DA\NFe\Traits;
/**
* Bloco Informações sobre impostos aproximados
*/
trait TraitBlocoX
{
protected function blocoX($y)
$this->bloco9H = 3;
bloco9H
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
class MyClass { } $x = new MyClass(); $x->foo = true;
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:
class MyClass { public $foo; } $x = new MyClass(); $x->foo = true;
/*
$aFont = ['font'=> $this->fontePadrao, 'size' => 7, 'style' => ''];
$this->pdf->textBox($this->margem, $y, $this->wPrint, $this->bloco9H, '', $aFont, 'T', 'C', true, '', false);
$aFont = ['font'=> $this->fontePadrao, 'size' => 6, 'style' => ''];
fontePadrao
if ($this->paperwidth < 70) {
paperwidth
$aFont = ['font'=> $this->fontePadrao, 'size' => 4, 'style' => ''];
}
if (!empty($this->creditos)) {
$this->pdf->textBox(
pdf
$this->margem,
margem
$y,
$this->wPrint,
wPrint
$this->bloco9H,
$this->creditos,
creditos
$aFont,
'C',
'R',
false,
'',
true
);
return $this->bloco9H + $y;
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: